当前位置: 首页>>代码示例>>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;未经允许,请勿转载。