本文整理汇总了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);
}