本文整理匯總了PHP中Zend_Cache_Backend_Interface類的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Cache_Backend_Interface類的具體用法?PHP Zend_Cache_Backend_Interface怎麽用?PHP Zend_Cache_Backend_Interface使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了Zend_Cache_Backend_Interface類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: touch
/**
* 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: load
/**
* 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: clear
/**
* 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);
}