Docs For Class Zend_Cache_Backend_Test

## Class Zend_Cache_Backend_Test

Description

Implements interfaces:

- Zend_Cache_Backend_Interface

- license: New BSD License
- copyright: Copyright (c) 2006 Zend Technologies USA Inc. (http://www.zend.com)

Located in /Zend/Cache/Backend/Test.php (line 35)

Method Summary
Zend_Cache_Backend_Test __construct ([array $options = array()])
boolean clean ([string $mode = Zend_Cache::CLEANING_MODE_ALL], [mixed $tags = array()])
string get (string $id, [boolean $doNotTestCacheValidity = false])
array getAllLogs ()
string getLastLog ()
int getLogIndex ()
boolean remove (string $id)
boolean save (string $data, string $id, [array $tags = array()])
void setDirectives (array $directives)
mixed test (string $id)
Methods
Constructor __construct (line 80)

Constructor

- access: public

Zend_Cache_Backend_Test __construct ([array $options = array()])

- array $options: associative array of options

clean (line 198)

Clean some cache records

For this test backend only, if $mode == 'false', then the method will return false (true else)

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)

- return: true if no problem
- access: public

boolean clean ([string $mode = Zend_Cache::CLEANING_MODE_ALL], [mixed $tags = array()])

- string $mode: clean mode

Implementation of:

Zend_Cache_Backend_Interface::clean()
  Clean some cache records

get (line 106)

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

For this test backend only, if $id == 'false', then the method will return false if $id == 'serialized', the method will return a serialized array ('foo' else)

- return: cached datas (or false)
- access: public

string get (string $id, [boolean $doNotTestCacheValidity = false])

- string $id: cache id
- boolean $doNotTestCacheValidity: if set to true, the cache validity won't be tested

Implementation of:

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

getAllLogs (line 232)

Get the complete log array

- return: complete log array
- access: public

array getAllLogs ()
getLastLog (line 212)

Get the last log

- return: the last log
- access: public

string getLastLog ()
getLogIndex (line 222)

Get the log index

- return: log index
- access: public

int getLogIndex ()
remove (line 171)

Remove a cache record

For this test backend only, if $id == 'false', then the method will return false (true else)

- return: true if no problem
- access: public

boolean remove (string $id)

- string $id: cache id

Implementation of:

Zend_Cache_Backend_Interface::remove()
  Remove a cache record

save (line 153)

Save some string datas into a cache record

For this test backend only, if $id == 'false', then the method will return false (true else)

- return: true if no problem
- access: public

boolean save (string $data, string $id, [array $tags = array()])

- string $data: datas to cache
- string $id: cache id
- array $tags: array of strings, the cache record will be tagged by each string entry

Implementation of:

Zend_Cache_Backend_Interface::save()
  Save some string datas into a cache record

setDirectives (line 90)

Set the frontend directives

- access: public

void setDirectives (array $directives)

- array $directives: assoc of directives

Implementation of:

Zend_Cache_Backend_Interface::setDirectives()
  Set the frontend directives

test (line 130)

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

For this test backend only, if $id == 'false', then the method will return false (123456 else)

- return: false (a cache is not available) or "last modified" timestamp (int) of the available cache record
- access: public

mixed test (string $id)

- string $id: cache id

Implementation of:

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

Documentation generated on Sun, 29 Oct 2006 21:27:34 -0600 by phpDocumentor 1.3.0RC6