Class SGL_Cache

Description

A wrapper for PEAR::Cache_Lite.

Located in /SGL/Cache.php (line 50)


	
			
Method Summary
 static Cache_Lite &singleton ([mixed $type = 'default'], [array $aOptions = array()], [boolean $forceNew = false])
 boolean clear ([string $group = false], [ $mode = 'ingroup'], [ $options = array()])
Methods
static singleton (line 83)

Returns one of Cache_Lite containers.

Example usage: Default Cache_Lite instance.

  1. $cache = &SGL_Cache::singleton();
Cache_Lite_Function instance with specified params on the fly. 2. $cache = &SGL_Cache::singleton('function', array( 'dontCacheWhenTheResultIsFalse' => true, 'dontCacheWhenTheResultIsNull' => true, 'lifeTime' => 3, 'debugCacheLiteFunction' => true, )); Cache_Lite_Output instance. 3. $cache = &SGL_Cache::singleton('output'); Force Cache_Lite_Function instance. 4. $cache = &SGL_Cache::singleton('function', array(), true); BC way to force cache. 5. $cache = &SGL_Cache::singleton(true);

  • access: public
Cache_Lite &singleton ([mixed $type = 'default'], [array $aOptions = array()], [boolean $forceNew = false])
  • mixed $type: Cache_Lite container. In BC mode flag to force boolean mode.
  • array $aOptions: Options to override config values on the fly.
  • boolean $forceNew: Force cache even if not in caching mode.
clear (line 145)

Clear cache directory of a specific module's cache files.

A simple wrapper to PEAR::Cache_Lite::clean() method.

boolean clear ([string $group = false], [ $mode = 'ingroup'], [ $options = array()])
  • string $group: name of the cache group (e.g. nav, blocks, etc.)
  • $mode
  • $options

Documentation generated on Tue, 23 Feb 2010 18:14:28 +0000 by phpDocumentor 1.4.3