Cache_Lite_Function
This class extends Cache_Lite and can be used to cache the result and output of functions/methods
This class is completly inspired from Sebastian Bergmann's PEAR/Cache_Function class. This is only an adaptation to Cache_Lite
There are some examples in the 'docs/examples' file Technical choices are described in the 'docs/technical' file
Located in /pear/cache/lite/Function.php (line 25)
Cache_Lite Cache_Lite_Function
Debug the Cache_Lite_Function caching process
Default cache group for function caching
Don't cache the method call when its output contains the string "NOCACHE"
if set to true, the output of the method will never be displayed (because the output is used to control the cache)
Don't cache the method call when its result is false
Don't cache the method call when its result is null
Inherited Variables
Inherited from Cache_Lite
Cache_Lite::$_automaticCleaningFactor
Cache_Lite::$_automaticSerialization
Cache_Lite::$_cacheDir
Cache_Lite::$_caching
Cache_Lite::$_errorHandlingAPIBreak
Cache_Lite::$_file
Cache_Lite::$_fileLocking
Cache_Lite::$_fileName
Cache_Lite::$_fileNameProtection
Cache_Lite::$_group
Cache_Lite::$_hashedDirectoryLevel
Cache_Lite::$_hashedDirectoryUmask
Cache_Lite::$_id
Cache_Lite::$_lifeTime
Cache_Lite::$_memoryCaching
Cache_Lite::$_memoryCachingArray
Cache_Lite::$_memoryCachingCounter
Cache_Lite::$_memoryCachingLimit
Cache_Lite::$_onlyMemoryCaching
Cache_Lite::$_pearErrorMode
Cache_Lite::$_readControl
Cache_Lite::$_readControlType
Cache_Lite::$_refreshTime
Cache_Lite::$_writeControl
Constructor
$options is an assoc. To have a look at availables options, see the constructor of the Cache_Lite class in 'Cache_Lite.php'
Comparing to Cache_Lite constructor, there is another option : $options = array( (...) see Cache_Lite constructor 'debugCacheLiteFunction' => (bool) debug the caching process, 'defaultGroup' => default cache group for function caching (string), 'dontCacheWhenTheOutputContainsNOCACHE' => (bool) don't cache when the function output contains "NOCACHE", 'dontCacheWhenTheResultIsFalse' => (bool) don't cache when the function result is false, 'dontCacheWhenTheResultIsNull' => (bool don't cache when the function result is null );
- array $options: options
Calls a cacheable function or method (or not if there is already a cache for it)
Arguments of this method are read with func_get_args. So it doesn't appear in the function definition. Synopsis : call('functionName', $arg1, $arg2, ...) (arg1, arg2... are arguments of 'functionName')
Drop a cache file
Arguments of this method are read with func_get_args. So it doesn't appear in the function definition. Synopsis : remove('functionName', $arg1, $arg2, ...) (arg1, arg2... are arguments of 'functionName')
Inherited Methods
Inherited From Cache_Lite
Cache_Lite::Cache_Lite()
Cache_Lite::clean()
Cache_Lite::extendLife()
Cache_Lite::get()
Cache_Lite::getMemoryCachingState()
Cache_Lite::lastModified()
Cache_Lite::raiseError()
Cache_Lite::remove()
Cache_Lite::save()
Cache_Lite::saveMemoryCachingState()
Cache_Lite::setLifeTime()
Cache_Lite::setOption()
Cache_Lite::setToDebug()
Documentation generated on Mon, 05 Mar 2007 21:02:11 +0000 by phpDocumentor 1.3.1