JCache

From Joomla! Documentation
Revision as of 13:11, 9 August 2009 by Batch1211 (Talk | contribs)

Jump to: navigation, search

JCache is an abstract class which defines Joomla's basic caching functionality. The class needs to be extended by a concred cache handler. The Joomla Framework currently provides the handlers JCacheView, JCachePage, JCacheCallback and JCacheOutput

Contents

Availability

From Joomla 1.5 Joomla 1.6

Defined in

/libraries/joomla/cache/cache.php

Extends

Extended by

Methods

Method name Description
__construct Constructor. It sets the caching options, like the language, the caching base directory path, but most importantly the storage engine to be used (See: JCacheStorage).
clean Clean the cache of a certain group. See JCacheStorage::clean().
gc Garbage collect expired cache data. See JCacheStorage::gc().
get Returns cached data by id and group. See JCacheStoragge::get().
getInstance Returns a concrete cache handler object, depending of the passed caching type paramter.
getStores Get the storage handlers that have been defined in the joomla caching library (libraries/joomla/cache/storage/
remove Remove a cached data entry by id and group. See JCacheStorage::remove()
setCacheValidation Depreceated.
setCaching Set caching enabled state. Pass true to enable caching.
setLifeTime Set cache lifetime
store Store the cached data by id and group. See JCacheStorage::store()

Importing

jimport( 'joomla.cache.cache' );

See also

Concrete Caching Handlers

Abstract Cache Storage Handler

Concrete Cache Storage Handlers

Personal tools
Namespaces

Variants
Actions
Navigation
Joomla! Sites
Toolbox