interface Doctrine_Cache_Interface (View source)

Doctrine cache driver interface

Methods

mixed
fetch(string $id, boolean $testCacheValidity = true)

Fetch a cache record from this cache driver instance

mixed
contains(string $id)

Test if a cache record exists for the passed id

boolean
save(string $id, string $data, int $lifeTime = false)

Save a cache record and add the key to the index of cached keys

boolean
delete(string $id)

Remove a cache record

Details

mixed fetch(string $id, boolean $testCacheValidity = true)

Fetch a cache record from this cache driver instance

Parameters

string $id cache id
boolean $testCacheValidity if set to false, the cache validity won't be tested

Return Value

mixed Returns either the cached data or false

mixed contains(string $id)

Test if a cache record exists for the passed id

Parameters

string $id cache id

Return Value

mixed false (a cache is not available) or "last modified" timestamp (int) of the available cache record

boolean save(string $id, string $data, int $lifeTime = false)

Save a cache record and add the key to the index of cached keys

Parameters

string $id cache id
string $data data to cache
int $lifeTime if != false, set a specific lifetime for this cache record (null => infinite lifeTime)

Return Value

boolean true if no problem

boolean delete(string $id)

Remove a cache record

Parameters

string $id cache id

Return Value

boolean true if no problem