Inheritances
Files
Overview
FRAMES
NO FRAMES

Abstract class Zend_Cache_Backend_ZendServer

Zend_Cache_Backend
|
Zend_Cache_Backend_ZendServer
Zend_Cache
|-Zend_Cache_Zend_Cache_Backend
|-abstract class Zend_Cache_Backend_ZendServer extends Zend_Cache_Backend implements Zend_Cache_Backend_Interface
PackageZend_Cache
SubpackageZend_Cache_Backend
CopyrightCopyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
Licensehttp://framework.zend.com/license/new-bsd New BSD License

Summary

Instance fields
# $_options Available options
Instance methods
# _clear() Clear cache
- _expireTime() Compute & return the expire time
# _fetch() Fetch data
# _store() Store data
# _unset() Unset data
+ clean() Clean some cache records
+ load() Test if a cache is available for the given id and (if yes) return it (false else)
+ remove() Remove a cache record
+ save() Save some string datas into a cache record
+ test() Test if a cache is available or not (for the given id)

Details

Instance fields

$_options
protected $_options = array( 'namespace' => 'zendframework' )
Available options

=====> (string) namespace :
Namespace to be used for chaching operations
Var array available options

Instance methods

_clear()
abstract protected function _clear( )
Clear cache
_expireTime()
private function _expireTime( $lifetime)
Compute & return the expire time
Parameters
$lifetime
Returns int expire time (unix timestamp)
_fetch()
abstract protected function _fetch( $id)
Fetch data
Parameters
string $id Cache id
_store()
abstract protected function _store( $data
$id
$timeToLive
)
Store data
Parameters
mixed $data Object to store
string $id Cache id
int $timeToLive Time to live in seconds
_unset()
abstract protected function _unset( $id)
Unset data
Parameters
string $id Cache id
clean()
public function clean( $mode = Zend_Cache::CLEANING_MODE_ALL
$tags = array()
)
Clean some cache records

Available modes are :
'all' (default) => remove all cache entries ($tags is not used)
'old' => unsupported
'matchingTag' => unsupported
'notMatchingTag' => unsupported
'matchingAnyTag' => unsupported
Parameters
string $mode clean mode
array $tags array of tags
Returns boolean true if no problem
load()
public function load( $id
$doNotTestCacheValidity = false
)
Test if a cache is available for the given id and (if yes) return it (false else)
Parameters
string $id cache id
boolean $doNotTestCacheValidity if set to true, the cache validity won't be tested
Returns string cached datas (or false)
remove()
public function remove( $id)
Remove a cache record
Parameters
string $id cache id
Returns boolean true if no problem
save()
public function save( $data
$id
$tags = array()
$specificLifetime = false
)
Save some string datas into a cache record

Note : $data is always "string" (serialization is done by the
core not by the backend)
Parameters
string $data datas to cache
string $id cache id
array $tags array of strings, the cache record will be tagged by each string entry
int $specificLifetime if != false, set a specific lifetime for this cache record (null => infinite lifetime)
Returns boolean true if no problem
test()
public function test( $id)
Test if a cache is available or not (for the given id)
Parameters
string $id cache id
Returns mixed false (a cache is not available) or "last modified" timestamp (int) of the available cache record