Public Member Functions | |
__construct (array $options=array()) | |
__destruct () | |
load ($id, $doNotTestCacheValidity=false) | |
test ($id) | |
save ($data, $id, $tags=array(), $specificLifetime=false) | |
remove ($id) | |
clean ($mode=Zend_Cache::CLEANING_MODE_ALL, $tags=array()) | |
getIds () | |
getTags () | |
getIdsMatchingTags ($tags=array()) | |
getIdsNotMatchingTags ($tags=array()) | |
getIdsMatchingAnyTags ($tags=array()) | |
getFillingPercentage () | |
getMetadatas ($id) | |
touch ($id, $extraLifetime) | |
getCapabilities () | |
___expire ($id) | |
Protected Attributes | |
$_options |
Definition at line 40 of file Sqlite.php.
__construct | ( | array $ | options = array() ) |
Constructor
array | $options | Associative array of options |
Zend_cache_Exception |
Reimplemented from Zend_Cache_Backend.
Definition at line 84 of file Sqlite.php.
__destruct | ( | ) |
___expire | ( | $ | id ) |
PUBLIC METHOD FOR UNIT TESTING ONLY !
Force a cache record to expire
string | $id | Cache id |
Definition at line 475 of file Sqlite.php.
clean | ( | $ | mode = Zend_Cache::CLEANING_MODE_ALL , |
$ | tags = array() |
||
) |
Clean some cache records
Available modes are : Zend_Cache::CLEANING_MODE_ALL (default) => remove all cache entries ($tags is not used) Zend_Cache::CLEANING_MODE_OLD => remove too old cache entries ($tags is not used) Zend_Cache::CLEANING_MODE_MATCHING_TAG => remove cache entries matching all given tags ($tags can be an array of strings or a single string) Zend_Cache::CLEANING_MODE_NOT_MATCHING_TAG => remove cache entries not {matching one of the given tags} ($tags can be an array of strings or a single string) Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG => remove cache entries matching any given tags ($tags can be an array of strings or a single string)
string | $mode | Clean mode |
array | $tags | Array of tags |
Implements Zend_Cache_Backend_Interface.
Definition at line 218 of file Sqlite.php.
getCapabilities | ( | ) |
Return an associative array of capabilities (booleans) of the backend
The array must include these keys :
Implements Zend_Cache_Backend_ExtendedInterface.
Definition at line 456 of file Sqlite.php.
getFillingPercentage | ( | ) |
Return the filling percentage of the backend storage
Zend_Cache_Exception |
Implements Zend_Cache_Backend_ExtendedInterface.
Definition at line 369 of file Sqlite.php.
getIds | ( | ) |
Return an array of stored cache ids
Implements Zend_Cache_Backend_ExtendedInterface.
Definition at line 231 of file Sqlite.php.
getIdsMatchingAnyTags | ( | $ | tags = array() ) |
Return an array of stored cache ids which match any given tags
In case of multiple tags, a logical AND is made between tags
array | $tags | array of tags |
Implements Zend_Cache_Backend_ExtendedInterface.
Definition at line 335 of file Sqlite.php.
getIdsMatchingTags | ( | $ | tags = array() ) |
Return an array of stored cache ids which match given tags
In case of multiple tags, a logical AND is made between tags
array | $tags | array of tags |
Implements Zend_Cache_Backend_ExtendedInterface.
Definition at line 266 of file Sqlite.php.
getIdsNotMatchingTags | ( | $ | tags = array() ) |
Return an array of stored cache ids which don't match given tags
In case of multiple tags, a logical OR is made between tags
array | $tags | array of tags |
Implements Zend_Cache_Backend_ExtendedInterface.
Definition at line 302 of file Sqlite.php.
getMetadatas | ( | $ | id ) |
Return an array of metadatas for the given cache id
The array must include these keys :
string | $id | cache id |
Implements Zend_Cache_Backend_ExtendedInterface.
Definition at line 395 of file Sqlite.php.
getTags | ( | ) |
Return an array of stored tags
Implements Zend_Cache_Backend_ExtendedInterface.
Definition at line 247 of file Sqlite.php.
load | ( | $ | id, |
$ | doNotTestCacheValidity = false |
||
) |
Test if a cache is available for the given id and (if yes) return it (false else)
string | $id | Cache id |
boolean | $doNotTestCacheValidity | If set to true, the cache validity won't be tested |
Implements Zend_Cache_Backend_Interface.
Definition at line 113 of file Sqlite.php.
remove | ( | $ | id ) |
Remove a cache record
string | $id | Cache id |
Implements Zend_Cache_Backend_Interface.
Definition at line 190 of file Sqlite.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)
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) |
Zend_Cache_Exception |
Implements Zend_Cache_Backend_Interface.
Definition at line 159 of file Sqlite.php.
test | ( | $ | id ) |
Test if a cache is available or not (for the given id)
string | $id | Cache id |
Implements Zend_Cache_Backend_Interface.
Definition at line 134 of file Sqlite.php.
touch | ( | $ | id, |
$ | extraLifetime | ||
) |
Give (if possible) an extra lifetime to the given cache id
string | $id | cache id |
int | $extraLifetime |
Implements Zend_Cache_Backend_ExtendedInterface.
Definition at line 425 of file Sqlite.php.
$_options [protected] |
array( 'cache_db_complete_path' => null, 'automatic_vacuum_factor' => 10 )
Reimplemented from Zend_Cache_Backend.
Definition at line 58 of file Sqlite.php.