/** * 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(); }
/** * */ 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(); }
/** * 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(); } }
public function deleteAll($auto_flush = true) { $this->engine->deleteAll(); if ($this->auto_flush && $auto_flush) { return $this->engine->flushAll(); } }
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(); } }
/** * 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(); } } }
/** * 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); }
/** * 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(); } }
/** * Delete all in cache provider */ public function clearCacheProvider() { if ($this->cacheProvider) { $this->cacheProvider->deleteAll(); } }
/** * Clear the owner tree cache */ public function clear() { $this->cache->deleteAll(); }
/** * Remove all cache * * @return void */ public function removeAll() { $this->provider->deleteAll(); }
/** * 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(); }
public function deleteAll() { return $this->driver->deleteAll(); }
/** * @return bool */ public function removeAllConfigurable() { return $this->modelCache->deleteAll(); }
/** * {@inheritdoc} */ public function clearCache() { return $this->cache->deleteAll(); }
/** * 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(); }
public function clearCache() { $this->cacheDriver->deleteAll(); }
/** * {@inheritdoc} */ public function evictAll() { return $this->cache->deleteAll(); }