JCacheStorage

From Joomla! Documentation
(Difference between revisions)
Jump to: navigation, search
(New page: '''JCacheStorage''' is an abstract class. The class needs to be extended by concrete storage handlers. The Joomla Framework currently provides the handlers [JCacheStorageApc]], [[JCacheSto...)
 
(Methods)
Line 29: Line 29:
 
|[[JCacheStorage/clean|clean]]
 
|[[JCacheStorage/clean|clean]]
 
|Clean cache for a group. Given a mode. Needs to be implemented in a concrete storage handler.
 
|Clean cache for a group. Given a mode. Needs to be implemented in a concrete storage handler.
 +
|-
 +
|[[JCacheStorage/gc|gc]]
 +
|Garbage collect expired cache data. Needs to be implemented in a concrete storage handler.
 
|-
 
|-
 
|[[JCacheStorage/get|get]]
 
|[[JCacheStorage/get|get]]
Line 35: Line 38:
 
|[[JCacheStorage/getInstance|getInstance]]
 
|[[JCacheStorage/getInstance|getInstance]]
 
|Returns a reference to a concrete cache storage handler object, only creating it, if it doesn't already exist.
 
|Returns a reference to a concrete cache storage handler object, only creating it, if it doesn't already exist.
 +
|-
 +
|[[JCacheStorage/remove|remove]]
 +
|Remove a cached data entry by id and group. Needs to be implemented in a concrete storage handler.
 
|-
 
|-
 
|[[JCacheStorage/store|store]]
 
|[[JCacheStorage/store|store]]
 
|Store the data to cache by id and group. Needs to be implemented in a concrete storage handler.
 
|Store the data to cache by id and group. Needs to be implemented in a concrete storage handler.
 
|-
 
|-
|[[JCacheStorage/remove|remove]]
+
|[[JCacheStorage/test|test]]
|Remove a cached data entry by id and group. Needs to be implemented in a concrete storage handler.
+
|Test to see if the storage handler is available. Needs to be implemented in a concrete storage handler.
 
|}
 
|}
 +
 
===Importing===
 
===Importing===
 
<source lang="php">jimport( 'joomla.cache.cache' );</source>
 
<source lang="php">jimport( 'joomla.cache.cache' );</source>

Revision as of 14:02, 9 August 2009

JCacheStorage is an abstract class. The class needs to be extended by concrete storage handlers. The Joomla Framework currently provides the handlers [JCacheStorageApc]], JCacheStorageEaccelarator, JCacheStorageFile, JCacheStorageMemcache, JCacheStorageXCache, JCacheStorageXcache

Contents

Availability

From Joomla 1.5 Joomla 1.6

Defined in

/libraries/joomla/cache/cache.php

Extends

Extended by

Methods

Method name Description
__construct Sets the storage options.
clean Clean cache for a group. Given a mode. Needs to be implemented in a concrete storage handler.
gc Garbage collect expired cache data. Needs to be implemented in a concrete storage handler.
get Get cached data by id and group. Needs to be implemented in a concrete storage handler.
getInstance Returns a reference to a concrete cache storage handler object, only creating it, if it doesn't already exist.
remove Remove a cached data entry by id and group. Needs to be implemented in a concrete storage handler.
store Store the data to cache by id and group. Needs to be implemented in a concrete storage handler.
test Test to see if the storage handler is available. Needs to be implemented in a concrete storage handler.

Importing

jimport( 'joomla.cache.cache' );

See also

Abstract Cache Storage Handler

Concrete Cache Storage Handlers

Concrete Caching Handlers

Personal tools
Namespaces

Variants
Actions
Navigation
Joomla! Sites
Toolbox