Support Joomla!

Packages

Package: Joomla-Framework

License

Content on this site is copyright © 2005 - 2008 Open Source Matters Inc and can be used in accordance with the Joomla! Electronic Documentation License. Some parts of this website may be subject to other licenses.

Abstract Class JCache

Description

Joomla! Cache base object

  • since: 1.5
  • abstract:

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

Class JObject   (Subpackage Base)

Abstract class JCache   (Subpackage Cache)
Direct descendents
Class Description
ClassJCacheView Joomla! Cache view type object
ClassJCachePage Joomla! Cache page type object
ClassJCacheCallback Joomla! Cache callback type object
ClassJCacheOutput Joomla! Cache output 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 51)

Constructor

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

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

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

Garbage collect expired cache data

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

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

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

Get the storage handlers

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

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

Set cache validation

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

Set caching enabled state

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

Set cache lifetime

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

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

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 Sat, 14 Nov 2009 11:11:13 +0000 by phpDocumentor 1.3.1