deleteAll() public method

{@inheritDoc}
public deleteAll ( )
コード例 #1
0
 /**
  * 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();
 }
コード例 #2
0
 /**
  *
  */
 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();
 }
コード例 #3
0
 /**
  * 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();
     }
 }
コード例 #4
0
ファイル: Cache.php プロジェクト: symforce/symforce-core
 public function deleteAll($auto_flush = true)
 {
     $this->engine->deleteAll();
     if ($this->auto_flush && $auto_flush) {
         return $this->engine->flushAll();
     }
 }
コード例 #5
0
 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;
     }
 }
 /**
  * Flush all cache entries
  *
  * @access public
  * @return void
  */
 public function flush()
 {
     if ($this->flush_namespace) {
         $this->adapted_provider->deleteAll();
     } else {
         $this->adapted_provider->flushAll();
     }
 }
コード例 #7
0
 /**
  * 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();
         }
     }
 }
コード例 #8
0
 /**
  * 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);
 }
コード例 #9
0
 /**
  * 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();
     }
 }
コード例 #10
0
 /**
  * Delete all in cache provider
  */
 public function clearCacheProvider()
 {
     if ($this->cacheProvider) {
         $this->cacheProvider->deleteAll();
     }
 }
コード例 #11
0
 /**
  * Clear the owner tree cache
  */
 public function clear()
 {
     $this->cache->deleteAll();
 }
コード例 #12
0
ファイル: Doctrine.php プロジェクト: itkg/core
 /**
  * Remove all cache
  *
  * @return void
  */
 public function removeAll()
 {
     $this->provider->deleteAll();
 }
コード例 #13
0
ファイル: ConfigCache.php プロジェクト: northdakota/platform
 /**
  * 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();
 }
コード例 #14
0
ファイル: Cache.php プロジェクト: anna-framework/anna
 public function deleteAll()
 {
     return $this->driver->deleteAll();
 }
コード例 #15
0
ファイル: ConfigCache.php プロジェクト: xamin123/platform
 /**
  * @return bool
  */
 public function removeAllConfigurable()
 {
     return $this->modelCache->deleteAll();
 }
コード例 #16
0
ファイル: AclCache.php プロジェクト: Dren-x/mobit
 /**
  * {@inheritdoc}
  */
 public function clearCache()
 {
     return $this->cache->deleteAll();
 }
コード例 #17
0
ファイル: ConfigCache.php プロジェクト: ramunasd/platform
 /**
  * Deletes cached "configurable" flags for all configs.
  *
  * @param bool $localCacheOnly
  *
  * @return bool TRUE if the cache entries were successfully deleted; otherwise, FALSE.
  */
 public function deleteAllConfigurable($localCacheOnly = false)
 {
     $this->localModelCache = [];
     return $localCacheOnly ? true : $this->modelCache->deleteAll();
 }
コード例 #18
0
ファイル: DoctrineHelper.php プロジェクト: pdt256/truecar
 public function clearCache()
 {
     $this->cacheDriver->deleteAll();
 }
コード例 #19
0
 /**
  * {@inheritdoc}
  */
 public function evictAll()
 {
     return $this->cache->deleteAll();
 }