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


PHP CacheProvider::deleteAll方法代碼示例

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


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

示例1: clean

 /**
  * Removes items from the cache by conditions.
  *
  * @param array $conditions
  * @return void
  */
 public function clean(array $conditions)
 {
     if (!isset($conditions[Nette\Caching\Cache::ALL])) {
         throw new NotImplementedException();
     }
     $this->provider->deleteAll();
 }
開發者ID:Richmond77,項目名稱:learning-nette,代碼行數:13,代碼來源:ReversedStorageDecorator.php

示例2: clearCache

 /**
  *
  */
 private function clearCache()
 {
     $container = $this->getConfigurationPool()->getContainer();
     $container->get('harentius_blog.router.category_slug_provider')->clearAll();
     $this->cache->deleteAll();
     $container->get('harentius_blog.controller.feed_cache')->deleteAll();
 }
開發者ID:harentius,項目名稱:blog-bundle,代碼行數:10,代碼來源:ArticleAdmin.php

示例3: updateTimestamp

 /**
  * Renews the timestamp of the last update of database translations for the given locale
  *
  * @param string|null $locale
  */
 public function updateTimestamp($locale = null)
 {
     if ($locale) {
         $this->localCache[$locale] = (new \DateTime('now', new \DateTimeZone('UTC')))->getTimestamp();
         $this->cacheImpl->save($locale, $this->localCache[$locale]);
     } else {
         $this->localCache = [];
         $this->cacheImpl->deleteAll();
     }
 }
開發者ID:Maksold,項目名稱:platform,代碼行數:15,代碼來源:DynamicTranslationMetadataCache.php

示例4: deleteAll

 public function deleteAll($auto_flush = true)
 {
     $this->engine->deleteAll();
     if ($this->auto_flush && $auto_flush) {
         return $this->engine->flushAll();
     }
 }
開發者ID:symforce,項目名稱:symforce-core,代碼行數:7,代碼來源:Cache.php

示例5: clearCacheDriver

 protected function clearCacheDriver(CacheProvider $cacheDriver = null, $description = "")
 {
     if ($cacheDriver !== null) {
         $this->output .= 'Doctrine ' . $description . ' cache: ' . $cacheDriver->getNamespace() . ' — ';
         $this->output .= $cacheDriver->deleteAll() ? '<info>OK</info>' : '<info>FAIL</info>';
         $this->output .= PHP_EOL;
     }
 }
開發者ID:QuangDang212,項目名稱:roadiz,代碼行數:8,代碼來源:DoctrineCacheClearer.php

示例6: flush

 /**
  * Flush all cache entries
  *
  * @access public
  * @return void
  */
 public function flush()
 {
     if ($this->flush_namespace) {
         $this->adapted_provider->deleteAll();
     } else {
         $this->adapted_provider->flushAll();
     }
 }
開發者ID:onemightyroar,項目名稱:php-activerecord-components,代碼行數:14,代碼來源:DoctrineCacheAdapter.php

示例7: clearCache

 /**
  * Clears the ownership metadata cache
  *
  * If the class name is not specified this method clears all cached data
  *
  * @param string|null $className
  */
 public function clearCache($className = null)
 {
     if ($this->cache) {
         if ($className !== null) {
             $this->cache->delete($className);
         } else {
             $this->cache->deleteAll();
         }
     }
 }
開發者ID:xamin123,項目名稱:platform,代碼行數:17,代碼來源:OwnershipMetadataProvider.php

示例8: build

 /**
  * Write to cache entity classes and appropriate events
  */
 public function build()
 {
     $this->assertProvider();
     // get all triggers data
     $triggerRepository = $this->registry->getManagerForClass('OroWorkflowBundle:ProcessTrigger')->getRepository('OroWorkflowBundle:ProcessTrigger');
     /** @var ProcessTrigger[] $triggers */
     $triggers = $triggerRepository->findAllWithDefinitions();
     $data = array();
     foreach ($triggers as $trigger) {
         $entityClass = $trigger->getDefinition()->getRelatedEntity();
         $event = $trigger->getEvent();
         if (!isset($data[$entityClass])) {
             $data[$entityClass] = array();
         }
         if (!in_array($event, $data[$entityClass])) {
             $data[$entityClass][] = $event;
         }
     }
     // write trigger data to cache
     $this->provider->deleteAll();
     $this->provider->save(self::DATA, $data);
     $this->provider->save(self::BUILT, true);
 }
開發者ID:ramunasd,項目名稱:platform,代碼行數:26,代碼來源:ProcessTriggerCache.php

示例9: clearCache

 /**
  * Clears the cache by security type
  *
  * If the $securityType is not specified, clear all cached data
  *
  * @param string|null $securityType The security type.
  */
 public function clearCache($securityType = null)
 {
     if ($this->cache) {
         if ($securityType !== null) {
             $this->cache->delete($securityType);
         } else {
             $this->cache->deleteAll();
         }
     }
     if ($securityType !== null) {
         unset($this->localCache[$securityType]);
     } else {
         $this->localCache = array();
     }
 }
開發者ID:xamin123,項目名稱:platform,代碼行數:22,代碼來源:EntitySecurityMetadataProvider.php

示例10: clearCacheProvider

 /**
  * Delete all in cache provider
  */
 public function clearCacheProvider()
 {
     if ($this->cacheProvider) {
         $this->cacheProvider->deleteAll();
     }
 }
開發者ID:modpreneur,項目名稱:trinity-settings,代碼行數:9,代碼來源:SettingsManager.php

示例11: clear

 /**
  * Clear the owner tree cache
  */
 public function clear()
 {
     $this->cache->deleteAll();
 }
開發者ID:xamin123,項目名稱:platform,代碼行數:7,代碼來源:OwnerTreeProvider.php

示例12: removeAll

 /**
  * Remove all cache
  *
  * @return void
  */
 public function removeAll()
 {
     $this->provider->deleteAll();
 }
開發者ID:itkg,項目名稱:core,代碼行數:9,代碼來源:Doctrine.php

示例13: deleteAllConfigurable

 /**
  * Deletes cached "configurable" flags for all configs.
  *
  * @return bool TRUE if the cache entries were successfully deleted; otherwise, FALSE.
  */
 public function deleteAllConfigurable()
 {
     $this->localModelCache = [];
     return $this->modelCache->deleteAll();
 }
開發者ID:northdakota,項目名稱:platform,代碼行數:10,代碼來源:ConfigCache.php

示例14: deleteAll

 public function deleteAll()
 {
     return $this->driver->deleteAll();
 }
開發者ID:anna-framework,項目名稱:anna,代碼行數:4,代碼來源:Cache.php

示例15: removeAllConfigurable

 /**
  * @return bool
  */
 public function removeAllConfigurable()
 {
     return $this->modelCache->deleteAll();
 }
開發者ID:xamin123,項目名稱:platform,代碼行數:7,代碼來源:ConfigCache.php


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