Zend Framework  1.12
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Zend_Cache_Backend_ZendServer Class Reference

Public Member Functions

 load ($id, $doNotTestCacheValidity=false)
 Test if a cache is available for the given id and (if yes) return it (false else)
 
 test ($id)
 Test if a cache is available or not (for the given id)
 
 save ($data, $id, $tags=array(), $specificLifetime=false)
 Save some string datas into a cache record.
 
 remove ($id)
 Remove a cache record.
 
 clean ($mode=Zend_Cache::CLEANING_MODE_ALL, $tags=array())
 Clean some cache records.
 
- Public Member Functions inherited from Zend_Cache_Backend
 __construct (array $options=array())
 Constructor.
 
 setDirectives ($directives)
 Set the frontend directives.
 
 setOption ($name, $value)
 Set an option.
 
 getOption ($name)
 Returns an option.
 
 getLifetime ($specificLifetime)
 Get the life time.
 
 isAutomaticCleaningAvailable ()
 Return true if the automatic cleaning is available for the backend.
 
 getTmpDir ()
 Determine system TMP directory and detect if we have read access.
 
- Public Member Functions inherited from Zend_Cache_Backend_Interface
 setDirectives ($directives)
 Set the frontend directives.
 

Protected Member Functions

 _store ($data, $id, $timeToLive)
 Store data.
 
 _fetch ($id)
 Fetch data.
 
 _unset ($id)
 Unset data.
 
 _clear ()
 Clear cache.
 
- Protected Member Functions inherited from Zend_Cache_Backend
 _isGoodTmpDir ($dir)
 Verify if the given temporary directory is readable and writable.
 
 _loggerSanity ()
 Make sure if we enable logging that the Zend_Log class is available.
 
 _log ($message, $priority=4)
 Log a message at the WARN (4) priority.
 

Protected Attributes

 $_options
 
- Protected Attributes inherited from Zend_Cache_Backend
 $_directives
 
 $_options = array()
 

Member Function Documentation

_clear ( )
abstractprotected

Clear cache.

_fetch (   $id)
abstractprotected

Fetch data.

Parameters
string$idCache id
Exceptions
Zend_Cache_Exception
_store (   $data,
  $id,
  $timeToLive 
)
abstractprotected

Store data.

Parameters
mixed$dataObject to store
string$idCache id
int$timeToLiveTime to live in seconds
Exceptions
Zend_Cache_Exception
_unset (   $id)
abstractprotected

Unset data.

Parameters
string$idCache id
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$modeclean mode
array$tagsarray of tags
Exceptions
Zend_Cache_Exception
Returns
boolean true if no problem

Implements Zend_Cache_Backend_Interface.

load (   $id,
  $doNotTestCacheValidity = false 
)

Test if a cache is available for the given id and (if yes) return it (false else)

Parameters
string$idcache id
boolean$doNotTestCacheValidityif set to true, the cache validity won't be tested
Returns
string cached datas (or false)

Implements Zend_Cache_Backend_Interface.

remove (   $id)

Remove a cache record.

Parameters
string$idcache id
Returns
boolean true if no problem

Implements Zend_Cache_Backend_Interface.

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$datadatas to cache
string$idcache id
array$tagsarray of strings, the cache record will be tagged by each string entry
int$specificLifetimeif != false, set a specific lifetime for this cache record (null => infinite lifetime)
Returns
boolean true if no problem

Implements Zend_Cache_Backend_Interface.

test (   $id)

Test if a cache is available or not (for the given id)

Parameters
string$idcache id
Returns
mixed false (a cache is not available) or "last modified" timestamp (int) of the available cache record
Exceptions
Zend_Cache_Exception

Implements Zend_Cache_Backend_Interface.

Member Data Documentation

$_options
protected
Initial value:
= array(
'namespace' => 'zendframework'
)