Joomla CMS  3.10.11 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.10.11 et du framework Joomla Platform intégré
Tout Structures de données Espaces de nommage Fichiers Fonctions Variables Pages
Référence de la classe Cache

Fonctions membres publiques

 __construct ($options)
 
 setCaching ($enabled)
 
 getCaching ()
 
 setLifeTime ($lt)
 
 contains ($id, $group=null)
 
 get ($id, $group=null)
 
 getAll ()
 
 store ($data, $id, $group=null)
 
 remove ($id, $group=null)
 
 clean ($group=null, $mode='group')
 
 gc ()
 
 lock ($id, $group=null, $locktime=null)
 
 unlock ($id, $group=null)
 
_getStorage ()
 

Fonctions membres publiques statiques

static getInstance ($type='output', $options=array())
 
static getStores ()
 
static getWorkarounds ($data, $options=array())
 
static setWorkarounds ($data, $options=array())
 
static makeId ()
 
static getPlatformPrefix ()
 
static addIncludePath ($path='')
 

Champs de données

 $_options
 

Attributs publics statiques

static $_handler = array()
 

Description détaillée

Joomla! Cache base object

Depuis
1.7.0

Documentation des constructeurs et destructeur

◆ __construct()

__construct (   $options)

Constructor

Paramètres
array$optionsCache options
Depuis
1.7.0

Références $option, $options, $value, JPATH_CACHE, et Cache\setCaching().

Documentation des fonctions membres

◆ _getStorage()

& _getStorage ( )

Get the cache storage handler

Renvoie
CacheStorage
Depuis
1.7.0

Références $hash.

Référencé par Cache\clean(), Cache\contains(), Cache\gc(), Cache\get(), Cache\getAll(), Cache\lock(), Cache\remove(), Cache\store(), et Cache\unlock().

◆ addIncludePath()

static addIncludePath (   $path = '')
static

Add a directory where Cache should search for handlers. You may either pass a string or an array of directories.

Paramètres
array | string$pathA path to search.
Renvoie
array An array with directory elements
Depuis
1.7.0

Références $path, et JLoader\import().

◆ clean()

clean (   $group = null,
  $mode = 'group' 
)

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

Paramètres
string$groupThe cache data group
string$modeThe mode for cleaning cache [group|notgroup]
Renvoie
boolean True on success, false otherwise
Depuis
1.7.0

Références $mode, Cache\_getStorage(), et Cache\getCaching().

◆ contains()

contains (   $id,
  $group = null 
)

Check if the cache contains data stored by ID and group

Paramètres
string$idThe cache data ID
string$groupThe cache data group
Renvoie
boolean
Depuis
3.7.0

Références $id, Cache\_getStorage(), et Cache\getCaching().

◆ gc()

gc ( )

Garbage collect expired cache data

Renvoie
boolean
Depuis
1.7.0

Références Cache\_getStorage(), et Cache\getCaching().

◆ get()

get (   $id,
  $group = null 
)

Get cached data by ID and group

Paramètres
string$idThe cache data ID
string$groupThe cache data group
Renvoie
mixed Boolean false on failure or a cached data object
Depuis
1.7.0

Références $id, Cache\_getStorage(), et Cache\getCaching().

◆ getAll()

getAll ( )

Get a list of all cached data

Renvoie
mixed Boolean false on failure or an object with a list of cache groups and data
Depuis
1.7.0

Références Cache\_getStorage(), et Cache\getCaching().

◆ getCaching()

getCaching ( )

Get caching state

Renvoie
boolean
Depuis
1.7.0

Référencé par Cache\clean(), Cache\contains(), Cache\gc(), Cache\get(), Cache\getAll(), Cache\lock(), Cache\remove(), Cache\store(), et Cache\unlock().

◆ getInstance()

static getInstance (   $type = 'output',
  $options = array() 
)
static

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

Paramètres
string$typeThe cache object type to instantiate
array$optionsThe array of options
Renvoie
CacheController
Depuis
1.7.0

Références $options, $type, et CacheController\getInstance().

Référencé par PlgSystemActionLogs\clearCacheGroups(), et Factory\getCache().

◆ getPlatformPrefix()

static getPlatformPrefix ( )
static

Set a prefix cache key if device calls for separate caching

Renvoie
string
Depuis
3.5

Référencé par MemcacheStorage\_getCacheId(), MemcachedStorage\_getCacheId(), et CacheStorage\_getCacheId().

◆ getStores()

static getStores ( )
static

Get the storage handlers

Renvoie
array
Depuis
1.7.0

$file

Références $class, et $file.

◆ getWorkarounds()

static getWorkarounds (   $data,
  $options = array() 
)
static

Perform workarounds on retrieved cached data

Paramètres
string$dataCached data
array$optionsArray of options
Renvoie
string Body of cached data
Depuis
1.7.0

Références $app, $data, $document, $name, $options, elseif, getDocument, et null.

Référencé par ViewController\get(), PageController\get(), CallbackController\get(), et HtmlDocument\getBuffer().

◆ lock()

lock (   $id,
  $group = null,
  $locktime = null 
)

Set lock flag on cached item

Paramètres
string$idThe cache data ID
string$groupThe cache data group
string$locktimeThe default locktime for locking the cache.
Renvoie
Object with properties of lock and locklooped
Depuis
1.7.0

Références $id, Cache\_getStorage(), et Cache\getCaching().

◆ makeId()

static makeId ( )
static

Create a safe ID for cached data from URL parameters

Renvoie
string MD5 encoded cache ID
Depuis
1.7.0

Références $app, $key, $param, $type, $value, et null.

Référencé par ViewController\_makeId(), et PageController\_makeId().

◆ remove()

remove (   $id,
  $group = null 
)

Remove a cached data entry by ID and group

Paramètres
string$idThe cache data ID
string$groupThe cache data group
Renvoie
boolean
Depuis
1.7.0

Références $id, Cache\_getStorage(), et Cache\getCaching().

◆ setCaching()

setCaching (   $enabled)

Set caching enabled state

Paramètres
boolean$enabledTrue to enable caching
Renvoie
void
Depuis
1.7.0

Références $enabled.

Référencé par Cache\__construct().

◆ setLifeTime()

setLifeTime (   $lt)

Set cache lifetime

Paramètres
integer$ltCache lifetime
Renvoie
void
Depuis
1.7.0

◆ setWorkarounds()

static setWorkarounds (   $data,
  $options = array() 
)
static

Create workarounds for data to be cached

Paramètres
string$dataCached data
array$optionsArray of options
Renvoie
string Data to be cached
Depuis
1.7.0

Références $app, $data, $document, $now, $options, $type, $value, et getDocument.

Référencé par ViewController\get(), CallbackController\get(), HtmlDocument\getBuffer(), et PageController\store().

◆ store()

store (   $data,
  $id,
  $group = null 
)

Store the cached data by ID and group

Paramètres
mixed$dataThe data to store
string$idThe cache data ID
string$groupThe cache data group
Renvoie
boolean
Depuis
1.7.0

Références $data, $id, Cache\_getStorage(), et Cache\getCaching().

◆ unlock()

unlock (   $id,
  $group = null 
)

Unset lock flag on cached item

Paramètres
string$idThe cache data ID
string$groupThe cache data group
Renvoie
boolean
Depuis
1.7.0

Références $id, Cache\_getStorage(), et Cache\getCaching().

Documentation des champs

◆ $_handler

$_handler = array()
static

◆ $_options

$_options

La documentation de cette classe a été générée à partir du fichier suivant :