當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CacheManager::resetCache方法代碼示例

本文整理匯總了PHP中CacheManager::resetCache方法的典型用法代碼示例。如果您正苦於以下問題:PHP CacheManager::resetCache方法的具體用法?PHP CacheManager::resetCache怎麽用?PHP CacheManager::resetCache使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CacheManager的用法示例。


在下文中一共展示了CacheManager::resetCache方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: afterAction

 function afterAction(&$base)
 {
     if (!Roll::isFormInvalid()) {
         $base->setInfoText($this->method);
     }
     LocationHistory::saveInfoText();
     if (Roll::isFormInvalid()) {
         LocationHistory::rollBack(1);
     } else {
         LocationHistory::resetPost();
         CacheManager::resetCache(0, TRUE);
         //performReset
         if (isset($base->nextAction)) {
             LocationHistory::rollBack($base->nextAction);
         } elseif (isset($base->rollBackNum)) {
             LocationHistory::rollBack($base->rollBackNum);
         } else {
             if ($this->method == "delete") {
                 $ctrl =& new AppController(LocationHistory::getBack(2));
                 // ha showdetails-rol mentunk a delete-re, akkor a showdetails elotti oldalra terunk vissza:
                 if ($ctrl->list == $this->list && $ctrl->method == "showdetails" && $ctrl->rollid == $this->rollid) {
                     LocationHistory::rollBack(3);
                 }
             }
             LocationHistory::rollBack(2);
         }
     }
 }
開發者ID:alencarmo,項目名稱:OCF,代碼行數:28,代碼來源:roll.php

示例2: deleteColumn

 function deleteColumn($field)
 {
     if ($field->isCommon) {
         $cidCond = "";
     } else {
         $cidCond = " AND cid=#cid#";
     }
     // ha nem common a custom field, amit torlunk, csak azoknak a custom listeknek az oszlopaibol kell torolni,
     // amik a field categoriajara specifikusak:
     $query = array("SELECT id, `columns`, cache FROM @search WHERE FIND_IN_SET(#id#, `columns`)!=0 {$cidCond}", "columns", $field->id, "columns", $field->cid);
     loadObjectsSql($lists = new CustomList(), $query, $lists);
     foreach ($lists as $l) {
         $f = preg_replace("{(,)?\\b{$this->id}\\b(?(1)|(,|\$))}", "", $l->columns);
         executeQuery(array("UPDATE @search SET `columns`=#f# WHERE id=#id#", "columns", $f, $l->id));
         if ($l->cache) {
             CacheManager::resetCache($l->id, TRUE, FALSE);
         }
     }
     $query = array("SELECT *, '' AS str FROM @search WHERE query LIKE '%{$field->columnIndex}%' {$cidCond}", $field->cid);
     $lists = new CustomList();
     $lists->cid = $field->cid;
     $lists->activateVariableFields();
     loadObjectsSql($lists, $query, $lists);
     foreach ($lists as $l) {
         unset($l->{$field->columnIndex});
         $l->makeSearchQuery(TRUE);
         modify($l);
         if ($l->cache) {
             CacheManager::resetCache($l->id, TRUE, FALSE);
         }
     }
 }
開發者ID:alencarmo,項目名稱:OCF,代碼行數:32,代碼來源:itemsearch.php

示例3: modify

 function modify($whereFields = "")
 {
     // betoltjuk aregi category-t:
     G::load($oldObject, $this->id, "appcategory");
     $this->handleExpirationFieldsContraversy();
     parent::modify($whereFields);
     // recursive esetben csak a wholeName valtoztatasarol van szo,
     // nincs attachment feltoltes, exp, vagy immediateAppear valtoztatas:
     if (!Roll::isFormInvalid()) {
         $this->storeAttachment();
         $this->handleExpirationChanges($oldObject->expiration);
         $this->handleImmediateAppearChanges($oldObject->immediateAppear);
         CacheManager::resetCache($this->id);
     }
 }
開發者ID:alencarmo,項目名稱:OCF,代碼行數:15,代碼來源:category.php

示例4: move

 function move()
 {
     global $gorumroll;
     // csak admin move-olhat:
     hasAdminRights($isAdm);
     if (!$isAdm) {
         return;
     }
     $oldCid = G::getAttr($this->id, "item", "cid");
     // ha nincs move-olas:
     if ($oldCid == $this->cid) {
         return;
     }
     G::load($newCategory, array("SELECT * FROM @category WHERE id=#cid#", $this->cid));
     // Ellenorzes:
     ItemField::filterCompatibleCategories($oldCid, $newCategory);
     if (!count($newCategory)) {
         return;
     }
     // trukkozes
     $newCategory = $newCategory[0];
     CustomField::addCustomColumns("item");
     G::load($oldFields, array("SELECT columnIndex FROM @customfield WHERE cid=#cid# ORDER BY sortId ASC", $oldCid));
     G::load($newFields, array("SELECT columnIndex FROM @customfield WHERE cid=#cid# ORDER BY sortId ASC", $this->cid));
     load($this);
     $newObj = gclone($this);
     $newObj->cid = $newCategory->id;
     if ($newCategory->immediateAppear) {
         $newObj->status = TRUE;
     }
     for ($i = 0; $i < count($oldFields); $i++) {
         if (isset($this->{$oldFields[$i]->columnIndex})) {
             $newObj->{$newFields[$i]->columnIndex} = $this->{$oldFields[$i]->columnIndex};
         }
     }
     modify($newObj);
     // itemnumok beallitasa
     if ($newObj->status) {
         $newCategory->increaseDirectItemNum();
     }
     G::load($oldCategory, $oldCid, "appcategory");
     if ($this->status) {
         $oldCategory->decreaseDirectItemNum();
     }
     Roll::setInfoText("adMoved");
     CacheManager::resetCache($this->cid);
     CacheManager::resetCache($oldCid);
 }
開發者ID:alencarmo,項目名稱:OCF,代碼行數:48,代碼來源:item.php

示例5: delete

 function delete()
 {
     load($this);
     parent::delete();
     if ($this->cache) {
         CacheManager::resetCache($this->id, TRUE, FALSE);
     }
 }
開發者ID:alencarmo,項目名稱:OCF,代碼行數:8,代碼來源:customlist.php


注:本文中的CacheManager::resetCache方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。