/** * Give (if possible) an extra lifetime to the given cache id * * @param string $id cache id * @param int $extraLifetime * @return boolean true if ok */ public function touch($id, $extraLifetime) { if (!$this->_extendedBackend) { Zend_Cache::throwException(self::BACKEND_NOT_IMPLEMENTS_EXTENDED_IF); } $id = $this->_id($id); // cache id may need prefix return $this->_backend->touch($id, $extraLifetime); }
/** * Load value from swap file. * * @internal * @param Zend_Memory_Container_Movable $container * @param integer $id */ public function load(Zend_Memory_Container_Movable $container, $id) { $value = $this->_backend->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); $this->_loadedObjects[$id] = $container; }
/** * Clears contents from storage * * @throws Zend_Auth_Storage_Exception If clearing contents from storage is impossible * @return void */ public function clear() { $this->_backend->remove($this->_id); }