예제 #1
0
파일: Core.php 프로젝트: realfluid/umbaugh
 /**
  * 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);
 }
예제 #2
0
 /**
  * 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;
 }
예제 #3
0
 /**
  * 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);
 }