eZ Publish  [4.2]
eZCache Class Reference

Main class for dealing with caches in eZ Publish. More...

List of all members.

Public Member Functions

 eZCache ()

Static Public Member Functions

static clearAll ($cacheList=false)
static clearByID ($idList, $cacheList=false)
static clearByTag ($tagName, $cacheList=false)
static clearTemplateOverrideCache ($cacheItem)
 Removes all template override cache files, subtree entries and clears in memory override cache.
static clearTSTranslationCache ($cacheItem)
 Clears the .ts translation cache.
static fetchByID ($id, $cacheInfoList=false)
static fetchByIDList ($idList, $cacheInfoList=false)
static fetchByTag ($tagName, $cacheInfoList=false)
static fetchIDList ($cacheInfoList=false)
static fetchList ()
static fetchTagList ($cacheInfoList=false)

Static Private Member Functions

static clearClassID ($cacheItem)
static clearContentCache ($cacheItem)
static clearContentTreeMenu ($cacheItem)
static clearGlobalINICache ($cacheItem)
static clearImageAlias ($cacheItem)
static clearItem ($cacheItem, $purge=false, $reporter=false, $iterationSleep=false, $iterationMax=false, $expiry=false)
static clearSortKey ($cacheItem)
static clearStateLimitations ($cacheItem)
static clearTemplateBlockCache ($cacheItem)
static clearTextToImageCache ($cacheItem)
static clearUserInfoCache ($cacheItem)
static purgeTextToImageCache ($cacheItem)

Detailed Description

Main class for dealing with caches in eZ Publish.

Has methods for clearing the various caches according to tag, id or all caches. It also has information for all the caches.

Definition at line 45 of file kernel/classes/ezcache.php.


Member Function Documentation

static eZCache::clearAll ( cacheList = false) [static]

Clears all cache items.

Definition at line 292 of file kernel/classes/ezcache.php.

static eZCache::clearByID ( idList,
cacheList = false 
) [static]

Finds all cache item which has ID equal to one of the IDs in $idList. You can also submit a single id to $idList.

Definition at line 331 of file kernel/classes/ezcache.php.

static eZCache::clearByTag ( tagName,
cacheList = false 
) [static]

Finds all cache item which has the tag $tagName and clears them.

Definition at line 308 of file kernel/classes/ezcache.php.

static eZCache::clearClassID ( cacheItem) [static, private]

Clears all content class identifier cache files from var/cache.

Definition at line 505 of file kernel/classes/ezcache.php.

Referenced by eZCacheClearClassID().

static eZCache::clearContentCache ( cacheItem) [static, private]

Clears all content caches by setting a new expiry value for the key *content-view-cache*.

Definition at line 562 of file kernel/classes/ezcache.php.

static eZCache::clearContentTreeMenu ( cacheItem) [static, private]

Sets the content tree menu timestamp to the current date and time, this is used as a GET parameter in the content/treemenu requests and thus forces a browser to load the content tree menu from a server rather than to use a cached copy.

Definition at line 464 of file kernel/classes/ezcache.php.

Referenced by eZCacheClearContentTreeMenu().

static eZCache::clearGlobalINICache ( cacheItem) [static, private]

Clear global ini cache

Definition at line 575 of file kernel/classes/ezcache.php.

Referenced by eZCacheClearGlobalINI().

static eZCache::clearImageAlias ( cacheItem) [static, private]

Sets the image alias timestamp to the current timestamp, this causes all image aliases to be recreated on viewing.

Definition at line 448 of file kernel/classes/ezcache.php.

Referenced by eZCacheClearImageAlias().

static eZCache::clearItem ( cacheItem,
purge = false,
reporter = false,
iterationSleep = false,
iterationMax = false,
expiry = false 
) [static, private]

Clears or purges the cache item $cacheItem.

If $purge is true then the system will ensure the entries are removed from local storage or database backend, otherwise it will use possible optimizations which might only invalidate the cache entry directly or use global expiry values.

Parameters:
$cacheItemCache item array taken from fetchList()
$purgeControls whether clearing/invalidation or purge is used.
$reporterCallback which is called when the system has purged files from the system, called with filename and purge count as parameters.
$iterationSleepThe amount of microseconds to sleep between each purge iteration, false means no sleep.
$iterationMaxThe maximum number of items to purge in one iteration, false means use default limit.
$expiryA timestamp which is matched against all cache items, if the modification of the cache is older than the expiry the cache is purged, false means no expiry checking.

Definition at line 365 of file kernel/classes/ezcache.php.

Referenced by clearAll(), clearByID(), clearByTag(), clearItems(), and purgeItems().

static eZCache::clearSortKey ( cacheItem) [static, private]

Clears all datatype sortkey cache files from var/cache.

Definition at line 520 of file kernel/classes/ezcache.php.

Referenced by eZCacheClearSortKey().

static eZCache::clearStateLimitations ( cacheItem) [static, private]

Clears all state limitation cache files.

Definition at line 607 of file kernel/classes/ezcache.php.

static eZCache::clearTemplateBlockCache ( cacheItem) [static, private]

Removes all template block cache files and subtree entries.

Definition at line 477 of file kernel/classes/ezcache.php.

Referenced by eZCacheClearTemplateBlockCache().

static eZCache::clearTemplateOverrideCache ( cacheItem) [static]

Removes all template override cache files, subtree entries and clears in memory override cache.

Since:
4.2 private

Definition at line 493 of file kernel/classes/ezcache.php.

static eZCache::clearTextToImageCache ( cacheItem) [static, private]

Clear texttoimage cache

Definition at line 585 of file kernel/classes/ezcache.php.

static eZCache::clearTSTranslationCache ( cacheItem) [static]

Clears the .ts translation cache.

Parameters:
array$cacheItem
Returns:
void

Definition at line 620 of file kernel/classes/ezcache.php.

static eZCache::clearUserInfoCache ( cacheItem) [static, private]

Clears the expiry cache file *var/cache/expiry.php*.

Clears all user-info caches by setting a new expiry value for the key *user-access-cache*.

Definition at line 549 of file kernel/classes/ezcache.php.

eZCache::eZCache ( )

Constructor

Definition at line 50 of file kernel/classes/ezcache.php.

static eZCache::fetchByID ( id,
cacheInfoList = false 
) [static]

Finds the first entry with the ID $id.

Returns:
The cache info structure.

Definition at line 256 of file kernel/classes/ezcache.php.

static eZCache::fetchByIDList ( idList,
cacheInfoList = false 
) [static]

Finds the entries matching and ID in the list $idList.

Returns:
An array with cache info structures.

Definition at line 274 of file kernel/classes/ezcache.php.

static eZCache::fetchByTag ( tagName,
cacheInfoList = false 
) [static]

Finds all cache entries using tag $tagName.

Returns:
An array with cache items.

Definition at line 236 of file kernel/classes/ezcache.php.

static eZCache::fetchIDList ( cacheInfoList = false) [static]

Goes through the cache info list $cacheInfoList and finds all the unique ids.

Returns:
An array with id strings.
Parameters:
$cacheInfoListIf false the list will automatically be fetched, if multiple eZCache functions are called it is a good idea to call fetchList() yourself and pass it as a parameter.

Definition at line 218 of file kernel/classes/ezcache.php.

static eZCache::fetchList ( ) [static]
Returns:
a list of all cache items in the system.

Definition at line 58 of file kernel/classes/ezcache.php.

Referenced by clearAll(), clearByID(), clearByTag(), fetchByID(), fetchByIDList(), fetchByTag(), fetchIDList(), and fetchTagList().

static eZCache::fetchTagList ( cacheInfoList = false) [static]

Goes through the cache info list $cacheInfoList and finds all the unique tags.

Returns:
An array with tag strings.
Parameters:
$cacheInfoListIf false the list will automatically be fetched, if multiple eZCache functions are called it is a good idea to call fetchList() yourself and pass it as a parameter.

Definition at line 195 of file kernel/classes/ezcache.php.

static eZCache::purgeTextToImageCache ( cacheItem) [static, private]

Purge texttoimage cache

Definition at line 596 of file kernel/classes/ezcache.php.


The documentation for this class was generated from the following file: