phpDocumentor Cache_Lite
[ class tree: Cache_Lite ] [ index: Cache_Lite ] [ all elements ]

Class: Cache_Lite_Function

Source Location: /lodel/scripts/Cache/Lite/Function.php

Class Cache_Lite_Function

Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

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

Inherited From Cache_Lite

Cache_Lite::Cache_Lite()
Constructor
Cache_Lite::clean()
Clean the cache
Cache_Lite::extendLife()
Extend the life of a valid cache file
Cache_Lite::get()
Test if a cache is available and (if yes) return it
Cache_Lite::getMemoryCachingState()
Load the state of the caching memory array from a given cache file cache
Cache_Lite::lastModified()
Return the cache last modification time
Cache_Lite::raiseError()
Trigger a PEAR error
Cache_Lite::remove()
Remove a cache file
Cache_Lite::save()
Save some data in a cache file
Cache_Lite::saveMemoryCachingState()
Save the state of the caching memory array into a cache file cache
Cache_Lite::setLifeTime()
Set a new life time
Cache_Lite::setOption()
Generic way to set a Cache_Lite option
Cache_Lite::setToDebug()
Set to debug mode
Cache_Lite::_cleanDir()
Recursive function for cleaning cache file in the given directory
Cache_Lite::_hash()
Make a control key with the string containing datas
Cache_Lite::_memoryCacheAdd()
Add some date in the memory caching array
Cache_Lite::_read()
Read the cache file and return the content
Cache_Lite::_setFileName()
Make a file name (with path)
Cache_Lite::_setRefreshTime()
Compute & set the refresh time
Cache_Lite::_unlink()
Remove a file
Cache_Lite::_write()
Write the given data in the cache file
Cache_Lite::_writeAndControl()
Write the given data in the cache file and control it just after to avoir corrupted cache entries

[ Top ]
Property Summary
boolean   $_debugCacheLiteFunction   Debug the Cache_Lite_Function caching process
string   $_defaultGroup   Default cache group for function caching
boolean   $_dontCacheWhenTheOutputContainsNOCACHE   Don't cache the method call when its output contains the string "NOCACHE"
boolean   $_dontCacheWhenTheResultIsFalse   Don't cache the method call when its result is false
boolean   $_dontCacheWhenTheResultIsNull   Don't cache the method call when its result is null

[ Top ]
Method Summary
Cache_Lite_Function   Cache_Lite_Function()   Constructor
mixed   call()   Calls a cacheable function or method (or not if there is already a cache for it)
boolean   drop()   Drop a cache file
string   _makeId()   Make an id for the cache

[ Top ]
Properties
boolean   $_debugCacheLiteFunction = false [line 62]

Debug the Cache_Lite_Function caching process


[ Top ]
string   $_defaultGroup = 'Cache_Lite_Function' [line 31]

Default cache group for function caching


[ Top ]
boolean   $_dontCacheWhenTheOutputContainsNOCACHE = false [line 41]

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)


[ Top ]
boolean   $_dontCacheWhenTheResultIsFalse = false [line 48]

Don't cache the method call when its result is false


[ Top ]
boolean   $_dontCacheWhenTheResultIsNull = false [line 55]

Don't cache the method call when its result is null


[ Top ]
Methods
Constructor Cache_Lite_Function  [line 85]

  Cache_Lite_Function Cache_Lite_Function( [array $options = array(NULL)]  )

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 );

Parameters:
array   $options:  options

API Tags:
Access:  public


[ Top ]
call  [line 109]

  mixed call( )

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')


API Tags:
Return:  result of the function/method
Access:  public


[ Top ]
drop  [line 185]

  boolean drop( )

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')


API Tags:
Return:  true if no problem
Access:  public


[ Top ]
_makeId  [line 198]

  string _makeId( $arguments  )

Make an id for the cache

Parameters:
   $arguments: 

API Tags:
Return:  id
Access:  private


[ Top ]

Documentation generated on Thu, 19 Jun 2008 05:07:45 +0200 by phpDocumentor 1.4.0a2