Public Member Functions | Data Fields | Protected Attributes

Zend_Cache_Backend_Xcache Class Reference

Inheritance diagram for Zend_Cache_Backend_Xcache:
Zend_Cache_Backend Zend_Cache_Backend_Interface

Public Member Functions

 __construct (array $options=array())
 load ($id, $doNotTestCacheValidity=false)
 test ($id)
 save ($data, $id, $tags=array(), $specificLifetime=false)
 remove ($id)
 clean ($mode=Zend_Cache::CLEANING_MODE_ALL, $tags=array())
 isAutomaticCleaningAvailable ()

Data Fields

const TAGS_UNSUPPORTED_BY_CLEAN_OF_XCACHE_BACKEND = 'Zend_Cache_Backend_Xcache::clean() : tags are unsupported by the Xcache backend'
const TAGS_UNSUPPORTED_BY_SAVE_OF_XCACHE_BACKEND = 'Zend_Cache_Backend_Xcache::save() : tags are unsupported by the Xcache backend'

Protected Attributes

 $_options

Detailed Description

Definition at line 41 of file Xcache.php.


Constructor & Destructor Documentation

__construct ( array $  options = array() )

Constructor

Parameters:
array$optionsassociative array of options
Exceptions:
Zend_Cache_Exception
Returns:
void

Reimplemented from Zend_Cache_Backend.

Definition at line 73 of file Xcache.php.


Member Function Documentation

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.

Definition at line 167 of file Xcache.php.

isAutomaticCleaningAvailable (  )

Return true if the automatic cleaning is available for the backend

Returns:
boolean

Reimplemented from Zend_Cache_Backend.

Definition at line 211 of file Xcache.php.

load ( id,
doNotTestCacheValidity = false 
)

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

WARNING $doNotTestCacheValidity=true is unsupported by the Xcache backend

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.

Definition at line 90 of file Xcache.php.

remove ( id )

Remove a cache record

Parameters:
string$idcache id
Returns:
boolean true if no problem

Implements Zend_Cache_Backend_Interface.

Definition at line 147 of file Xcache.php.

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.

Definition at line 131 of file Xcache.php.

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

Implements Zend_Cache_Backend_Interface.

Definition at line 108 of file Xcache.php.


Field Documentation

$_options [protected]
Initial value:
 array(
        'user' => null,
        'password' => null
    )

Reimplemented from Zend_Cache_Backend.

Definition at line 61 of file Xcache.php.

const TAGS_UNSUPPORTED_BY_CLEAN_OF_XCACHE_BACKEND = 'Zend_Cache_Backend_Xcache::clean() : tags are unsupported by the Xcache backend'

Log message

Definition at line 47 of file Xcache.php.


The documentation for this class was generated from the following file: