/** * Internal method to check if the given cache supports tags * * @param Zend_Cache $cache */ private static function _getTagSupportForCache() { $backend = self::$_cache->getBackend(); if ($backend instanceof Zend_Cache_Backend_ExtendedInterface) { $cacheOptions = $backend->getCapabilities(); self::$_cacheTags = $cacheOptions['tags']; } else { self::$_cacheTags = false; } return self::$_cacheTags; }
/** * Load value from swap file. * * @internal * @param \Zend\Memory\Container\Movable $container * @param integer $id */ public function load(Container\Movable $container, $id) { $value = $this->_cache->load($this->_managerId . $id, true); // Try to swap other objects if necessary // (do not include specified object into check) $this->_memorySize += strlen($value); $this->_swapCheck(); // Add loaded obect to the end of loaded objects list $container->setValue($value); if ($this->_sizes[$id] > $this->_minSize) { // Add object to the end of "unload candidates list" $this->_unloadCandidates[$id] = $container; } }
public function tearDown() { $this->_cache->clean(Cache::CLEANING_MODE_ALL); $this->_cache = null; }