本文整理汇总了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();
}
示例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();
}
示例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();
}
}
示例4: deleteAll
public function deleteAll($auto_flush = true)
{
$this->engine->deleteAll();
if ($this->auto_flush && $auto_flush) {
return $this->engine->flushAll();
}
}
示例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;
}
}
示例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();
}
}
示例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();
}
}
}
示例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);
}
示例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();
}
}
示例10: clearCacheProvider
/**
* Delete all in cache provider
*/
public function clearCacheProvider()
{
if ($this->cacheProvider) {
$this->cacheProvider->deleteAll();
}
}
示例11: clear
/**
* Clear the owner tree cache
*/
public function clear()
{
$this->cache->deleteAll();
}
示例12: removeAll
/**
* Remove all cache
*
* @return void
*/
public function removeAll()
{
$this->provider->deleteAll();
}
示例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();
}
示例14: deleteAll
public function deleteAll()
{
return $this->driver->deleteAll();
}
示例15: removeAllConfigurable
/**
* @return bool
*/
public function removeAllConfigurable()
{
return $this->modelCache->deleteAll();
}