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


PHP Cache::clearAll方法代碼示例

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


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

示例1: jobProceduralAction

 public function jobProceduralAction()
 {
     $status = array("success" => true);
     if ($this->getParam("type") == "files") {
         Update::installData($this->getParam("revision"));
     } else {
         if ($this->getParam("type") == "clearcache") {
             \Pimcore\Model\Cache::clearAll();
         } else {
             if ($this->getParam("type") == "preupdate") {
                 $status = Update::executeScript($this->getParam("revision"), "preupdate");
             } else {
                 if ($this->getParam("type") == "postupdate") {
                     $status = Update::executeScript($this->getParam("revision"), "postupdate");
                 } else {
                     if ($this->getParam("type") == "cleanup") {
                         Update::cleanup();
                     } else {
                         if ($this->getParam("type") == "languages") {
                             Update::downloadLanguage();
                         }
                     }
                 }
             }
         }
     }
     $this->_helper->json($status);
 }
開發者ID:pawansgi92,項目名稱:pimcore2,代碼行數:28,代碼來源:IndexController.php

示例2: jobProceduralAction

 public function jobProceduralAction()
 {
     $status = array("success" => true);
     if ($this->getParam("type") == "files") {
         Update::installData($this->getParam("revision"));
     } else {
         if ($this->getParam("type") == "clearcache") {
             \Pimcore\Model\Cache::clearAll();
         } else {
             if ($this->getParam("type") == "preupdate") {
                 $status = Update::executeScript($this->getParam("revision"), "preupdate");
             } else {
                 if ($this->getParam("type") == "postupdate") {
                     $status = Update::executeScript($this->getParam("revision"), "postupdate");
                 } else {
                     if ($this->getParam("type") == "cleanup") {
                         Update::cleanup();
                     }
                 }
             }
         }
     }
     // we use pure PHP here, otherwise this can cause issues with dependencies that changed during the update
     header("Content-type: application/json");
     echo json_encode($status);
     exit;
 }
開發者ID:ChristophWurst,項目名稱:pimcore,代碼行數:27,代碼來源:IndexController.php

示例3: clearCacheAction

 public function clearCacheAction()
 {
     $this->checkPermission("clear_cache");
     // empty document cache
     Cache::clearAll();
     $db = \Pimcore\Resource::get();
     $db->query("truncate table cache_tags");
     $db->query("truncate table cache");
     // empty cache directory
     recursiveDelete(PIMCORE_CACHE_DIRECTORY, false);
     // PIMCORE-1854 - recreate .dummy file => should remain
     \Pimcore\File::put(PIMCORE_CACHE_DIRECTORY . "/.dummy", "");
     $this->_helper->json(array("success" => true));
 }
開發者ID:pawansgi92,項目名稱:pimcore2,代碼行數:14,代碼來源:SettingsController.php

示例4: delete

 /**
  *
  */
 public function delete()
 {
     // delete all childs
     $list = new Listing();
     $list->setCondition("parentId = ?", $this->getId());
     $list->load();
     if (is_array($list->getUsers())) {
         foreach ($list->getUsers() as $user) {
             $user->delete();
         }
     }
     // now delete the current user
     $this->getResource()->delete();
     \Pimcore\Model\Cache::clearAll();
 }
開發者ID:rolandstoll,項目名稱:pimcore,代碼行數:18,代碼來源:AbstractUser.php

示例5: flushAll

 /**
  * {@inheritdoc}
  */
 public function flushAll()
 {
     try {
         SystemCache::clearAll();
         return true;
     } catch (\Exception $e) {
         return false;
     }
 }
開發者ID:seeruk,項目名稱:pimcore-di-plugin,代碼行數:12,代碼來源:PimcoreCache.php


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