Support Joomla!

Joomla! 1.5 Documentation

Packages

Package: Joomla-Framework

License

Content on this site is copyright © 2005 - 2008 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution- NonCommercial- ShareAlike 2.5. Some parts of this website may be subject to other licenses.

Abstract Class JCache

Description

Joomla! Cache base object

Located in /joomla/cache/cache.php (line 30)

Class JObject   (Subpackage Base)

Abstract class JCache   (Subpackage Cache)
Direct descendents
Class Description
ClassJCacheCallback Joomla! Cache callback type object
ClassJCacheOutput Joomla! Cache output type object
ClassJCachePage Joomla! Cache page type object
ClassJCacheView Joomla! Cache view type object
Method Summary
Static method static object A &getInstance ([string $type = 'output'], [ $options = array()])
Constructor JCache __construct (array $options)
Method boolean clean ([string $group = null], [string $mode = 'group'])
Method boolean gc ()
Abstract method mixed get (string $id, [string $group = null])
Method array getStores ()
Abstract method boolean remove (string $id, [string $group = null])
Method void setCaching (boolean $enabled)
Method void setLifeTime (int $lt)
Method boolean store (mixed $data, string $id, [string $group = null])
Method object A &_getStorage ()
Variables

Inherited Variables

Inherited from JObject

Variable JObject::$_errors
Methods
Constructor __construct (line 52)

Constructor

  • access: protected
JCache __construct (array $options)
  • array $options: options

Redefinition of:
JObject::__construct()
Class constructor, overridden in descendant classes.
clean (line 266)

Clean cache for a group given a mode.

group mode : cleans all cache in the group notgroup mode : cleans all cache not in the group

  • return: True on success, false otherwise
  • since: 1.5
  • access: public
boolean clean ([string $group = null], [string $mode = 'group'])
  • string $group: The cache data group
  • string $mode: The mode for cleaning cache [group|notgroup]
gc (line 286)

Garbage collect expired cache data

  • return: True on success, false otherwise.
  • since: 1.5
  • access: public
boolean gc ()
get (line 195)

Get cached data by id and group

  • return: Boolean false on failure or a cached data string
  • since: 1.5
  • access: public
  • abstract:
mixed get (string $id, [string $group = null])
  • string $id: The cache data id
  • string $group: The cache data group

Redefinition of:
JObject::get()
Returns a property of the object or the default value if the property is not set.

Redefined in descendants as:
getInstance (line 96)

Returns a reference to a cache adapter object, always creating it

  • return: JCache object
  • since: 1.5
object A &getInstance ([string $type = 'output'], [ $options = array()])
  • string $type: The cache object type to instantiate
  • $options
getStores (line 124)

Get the storage handlers

  • return: An array of available storage handlers
  • access: public
array getStores ()
remove (line 241)

Remove a cached data entry by id and group

  • return: True on success, false otherwise
  • since: 1.5
  • access: public
  • abstract:
boolean remove (string $id, [string $group = null])
  • string $id: The cache data id
  • string $group: The cache data group
setCacheValidation (line 180)

Set cache validation

  • since: 1.5
  • access: public
void setCacheValidation ()
setCaching (line 155)

Set caching enabled state

  • since: 1.5
  • access: public
void setCaching (boolean $enabled)
  • boolean $enabled: True to enable caching
setLifeTime (line 168)

Set cache lifetime

  • since: 1.5
  • access: public
void setLifeTime (int $lt)
  • int $lt: Cache lifetime
store (line 218)

Store the cached data by id and group

  • return: True if cache stored
  • since: 1.5
  • access: public
boolean store (mixed $data, string $id, [string $group = null])
  • string $id: The cache data id
  • string $group: The cache data group
  • mixed $data: The data to store

Redefined in descendants as:
_getStorage (line 303)

Get the cache storage handler

  • return: JCacheStorage object
  • since: 1.5
  • access: protected
object A &_getStorage ()

Inherited Methods

Inherited From JObject

 JObject::JObject()
 JObject::__construct()
 JObject::get()
 JObject::getError()
 JObject::getErrors()
 JObject::getProperties()
 JObject::getPublicProperties()
 JObject::set()
 JObject::setError()
 JObject::setProperties()
 JObject::toString()

Documentation generated on Tue, 29 Jan 2008 18:44:48 +0000 by phpDocumentor 1.3.1