Class CMS_cache

Description

static Class CMS_cache Represent a cache object

Located in /automne/classes/files/cache.php (line 24)

CMS_grandFather
   |
   --CMS_cache
Method Summary
 static boolean clearTypeCache (string $type)
 static boolean clearTypeCacheByMetas (string $type, array $metas, [contant $mode = Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG])
 static string wrapCode (string $hash, string $content, [string $lifetime = 'auto'])
 void __construct (string $hash, string $type, [mixed $lifetime = null], [ $contextAware = false])
 boolean clear ([array $metas = array()], [contant $mode = Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG])
 string endSave ()
 boolean exist ()
 array getByMetas (array $metas, [contant $mode = Zend_Cache::CLEANING_MODE_MATCHING_TAG])
 string load ()
 boolean save (string $content, [array $metas = array()])
 void start ()
 array _createTags (array $metas)
Methods
static clearTypeCache (line 321)

Clear a type cache

  • access: public
static boolean clearTypeCache (string $type)
  • string $type: : the cache type to clear
static clearTypeCacheByMetas (line 353)

Clear type cache using metas

  • access: public
static boolean clearTypeCacheByMetas (string $type, array $metas, [contant $mode = Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG])
  • string $type: : the cache type to clear
  • array $metas: : the cache metas to clear
  • contant $mode: : the zend cache constant to clean matching cache Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG (default) Zend_Cache::CLEANING_MODE_MATCHING_TAG Zend_Cache::CLEANING_MODE_NOT_MATCHING_TAG
static wrapCode (line 405)

Wrap given PHP code with PHP cache code

  • return: : the new PHP code wrapped with the cache code
  • access: public
static string wrapCode (string $hash, string $content, [string $lifetime = 'auto'])
  • string $hash: : the cache hash to use
  • string $content: : the PHP code to wrap
  • string $lifetime: : the lifetime to use for cache (default : auto)
Constructor __construct (line 63)

Constructor.

initialize object.

  • access: public
void __construct (string $hash, string $type, [mixed $lifetime = null], [ $contextAware = false])
  • string $hash: the cache hash to use
  • string $type: : the type of the cache to use
  • mixed $lifetime: : the cache lifetime
  • $contextAware
clear (line 193)

Clear cache by metas

  • access: public
boolean clear ([array $metas = array()], [contant $mode = Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG])
  • array $metas: : the cache metas to clear cache of
  • contant $mode: : the zend cache constant to clean matching cache Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG (default) Zend_Cache::CLEANING_MODE_MATCHING_TAG Zend_Cache::CLEANING_MODE_NOT_MATCHING_TAG
endSave (line 283)

End output buffering and save result to cache

  • return: : the buffered content saved into cache
  • access: public
string endSave ()
exist (line 128)

Does cache content exists

  • access: public
boolean exist ()
getByMetas (line 224)

Get zend cache ids by metas

  • return: of Zend cache ids
  • access: public
array getByMetas (array $metas, [contant $mode = Zend_Cache::CLEANING_MODE_MATCHING_TAG])
  • array $metas: : the cache metas to get
  • contant $mode: : the zend cache constant to clean matching cache Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG Zend_Cache::CLEANING_MODE_MATCHING_TAG (default) Zend_Cache::CLEANING_MODE_NOT_MATCHING_TAG
load (line 147)

Load cache content

  • return: : the cache content
  • access: public
string load ()
save (line 168)

Save cache content

  • access: public
boolean save (string $content, [array $metas = array()])
  • array $metas: : the cache metas to set
  • string $content: content : the cache content to save
start (line 273)

Start cache buffering All output starting from this method call will be recorded to be saved in cache

  • access: public
void start ()
_createTags (line 245)

Convert cache metas into Zend cache tags

  • return: Zend cache tags
  • access: private
array _createTags (array $metas)
  • array $metas: : the cache metas to convert

Inherited Methods

Inherited From CMS_grandFather

 CMS_grandFather::autoload()
 CMS_grandFather::hasError()
 CMS_grandFather::log()
 CMS_grandFather::PHPErrorHandler()
 CMS_grandFather::raiseError()
 CMS_grandFather::setDebug()
 CMS_grandFather::setLog()
 CMS_grandFather::_raiseError()
 CMS_grandFather::__call()
Class Constants

Documentation generated on Wed, 15 Feb 2012 15:29:15 +0100 by phpDocumentor 1.4.3