public function gc($lifetime) { // FIXME: This is not the valid signature we would really want to have, // but this doesn't seems that easy to match the real PHP session lifetime // API signature with cache backends. $this->cacheBackend->clear(); return TRUE; }
/** * {@inheritdoc} */ public function clear() { // Remove the cache. $this->cacheObject->clear($this->generateCacheId()); // Delete all cache fragments for that hash. $query = new \EntityFieldQuery(); $results = $query->entityCondition('entity_type', 'cache_fragment')->propertyCondition('hash', $this->generateCacheId())->execute(); if (empty($results['cache_fragment'])) { return; } // Delete the actual entities. entity_delete_multiple('cache_fragment', array_keys($results['cache_fragment'])); }
/** * {inheritdoc} */ public function deleteAll() { return $this->backend->clear('*', true); }
/** * Stores data in the persistent cache, respecting the use caches flag. * * @see \DrupalCacheInterface::set() */ protected function cacheSet($cid, $data, $expire = CACHE_PERMANENT, array $tags = array()) { if ($this->cacheBackend && $this->useCaches) { $this->cacheBackend->set($cid, $data, $expire, $tags); } }
/** * Reset the internal cache. * * Note: This is just thought for tests. */ public function reset() { $this->cachedDefinition = NULL; $this->cache->clear($this->getCacheId()); }
function isEmpty() { return $this->backend->isEmpty(); }