Public Member Functions | Data Fields

Zend_Cache_Backend_ZendPlatform Class Reference

Inheritance diagram for Zend_Cache_Backend_ZendPlatform:
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())

Data Fields

const TAGS_PREFIX = "internal_ZPtag:"

Detailed Description

Definition at line 42 of file ZendPlatform.php.


Constructor & Destructor Documentation

__construct ( array $  options = array() )

Constructor Validate that the Zend Platform is loaded and licensed

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

Reimplemented from Zend_Cache_Backend.

Definition at line 57 of file ZendPlatform.php.


Member Function Documentation

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) This mode is not supported in this backend 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 => unsupported 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)

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 185 of file ZendPlatform.php.

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 data (or false)

Implements Zend_Cache_Backend_Interface.

Definition at line 86 of file ZendPlatform.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 161 of file ZendPlatform.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$dataData 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 130 of file ZendPlatform.php.

test ( id )

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

Parameters:
string$idCache id
Returns:
mixed|false false (a cache is not available) or "last modified" timestamp (int) of the available cache record

Implements Zend_Cache_Backend_Interface.

Definition at line 109 of file ZendPlatform.php.


Field Documentation

const TAGS_PREFIX = "internal_ZPtag:"

internal ZP prefix

Definition at line 47 of file ZendPlatform.php.


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