Doctrine 1.2.4
Doctrine_Cache_Interface Interface Reference

Inherited by Doctrine_Cache_Driver.

Public Member Functions

 contains ($id)
 
 delete ($id)
 
 fetch ($id, $testCacheValidity=true)
 
 save ($id, $data, $lifeTime=false)
 

Detailed Description

Definition at line 34 of file Interface.php.

Member Function Documentation

Doctrine_Cache_Interface::contains (   $id)

Test if a cache record exists for the passed id

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

Remove a cache record

Parameters
string$idcache id
Returns
boolean true if no problem
Doctrine_Cache_Interface::fetch (   $id,
  $testCacheValidity = true 
)

Fetch a cache record from this cache driver instance

Parameters
string$idcache id
boolean$testCacheValidityif set to false, the cache validity won't be tested
Returns
mixed Returns either the cached data or false
Doctrine_Cache_Interface::save (   $id,
  $data,
  $lifeTime = false 
)

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

Parameters
string$idcache id
string$datadata to cache
int$lifeTimeif != false, set a specific lifetime for this cache record (null => infinite lifeTime)
Returns
boolean true if no problem

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