Stateful Cache - An Extension to PHP / PEAR's Cache_Lite
Read more about Stateful_Cache here
Stateful Cache requires the PEAR Class Cache_Lite
Download
Stateful_Cache version 0.8
Documentation
(Generated by PHPDocumentor)Note - Methods and Properties in Cache_Lite have been stripped from the docs - View the Cache_Lite docs for all available parameters
Stateful_Cache
Extension for Cache_Lite that provides stateful caching checks for validating or invalidating cache files on variables
Use this class to write "state verification" functions, with values, to the header of the cache file. The function then is eval'd on the cache request and must return true for the cache file to be considered valid In order for the functions to actually work, they need to be contained within a file somewhere that is included prior to reading the cache header
Located in /scache_Lite.php (line 25)
Cache_Lite | --Stateful_Cache
Constructor Stateful_Cache (line 48)Constructor for Stateful_Cache
Accepts same options array as Cache_Lite
- $options
clearState (line 82)Resets (clears) the state functions array
get (line 213)Test if a cache is available and (if yes) return it
This function will also check the validity of the stateful cache header if it exists
- string $id: cache id
- string $group: name of the cache group
- boolean $doNotTestCacheValidity: if set to true, the cache validity won't be tested
registerState (line 71)Registers a state function into the _stateFunctions array that will be written to the header. This method will verify that the function is unique and hasn't already been added
- $function
registerStateFile (line 61)- string $filePath: containing the full path to the file that is being loaded that contains the Stateful_Cache functions within the header
save (line 281)Save some data in a cache file If cache functions are registered, they are added to the header, after serialization, and prior to saving.
- string $data: data to put in cache (can be another type than strings if automaticSerialization is on)
- string $id: cache id
- string $group: name of the cache group
Documentation generated on Wed, 05 Aug 2009 13:56:42 -0500 by phpDocumentor 1.4.0
You must be signed in to comment on this Article
Digg
Facebook
MySpace
del.icio.us
