kernel/classes/ezcache.php

Show: inherited
Table of Contents

File containing the {@link eZCache} class

Copyright
Copyright (C) 1999-2011 eZ Systems AS. All rights reserved.  
License
eZ Business Use License Agreement Version 2.0  
Package
kernel  
Version
4.6.0  

Functions

functioneZCacheClearClassID(  $cacheItem ) : void

Helper function for eZCache::clearClassID.

Static functions in classes cannot be used as callback functions in PHP 4, that is why we need this helper.

Parameters
Name Type Description
$cacheItem
Details
Deprecated
Callback to static class function is now done directly.  
functioneZCacheClearContentTreeMenu(  $cacheItem ) : void

Helper function for eZCache::clearContentTreeMenu.

Static functions in classes cannot be used as callback functions in PHP 4, that is why we need this helper.

Parameters
Name Type Description
$cacheItem
Details
Deprecated
Callback to static class function is now done directly.  
functioneZCacheClearGlobalINI(  $cacheItem ) : void

Helper function for eZCache::clearGlobalINICache.

Static functions in classes cannot be used as callback functions in PHP 4, that is why we need this helper.

Parameters
Name Type Description
$cacheItem
Details
Deprecated
Callback to static class function is now done directly.  
functioneZCacheClearImageAlias(  $cacheItem ) : void

Helper function for eZCache::clearImageAlias.

Static functions in classes cannot be used as callback functions in PHP 4, that is why we need this helper.

Parameters
Name Type Description
$cacheItem
Details
Deprecated
Callback to static class function is now done directly.  
functioneZCacheClearSortKey(  $cacheItem ) : void

Helper function for eZCache::clearSortKey.

Static functions in classes cannot be used as callback functions in PHP 4, that is why we need this helper.

Parameters
Name Type Description
$cacheItem
Details
Deprecated
Callback to static class function is now done directly.  
functioneZCacheClearTemplateBlockCache(  $cacheItem ) : void

Helper function for eZCache::clearTemplateBlockCache.

Static functions in classes cannot be used as callback functions in PHP 4, that is why we need this helper.

Parameters
Name Type Description
$cacheItem
Details
Deprecated
Callback to static class function is now done directly.  

\eZCache

Package: kernel

eZCache ezcache.php

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.

Methods

methodpublicclearActiveExtensions(  $cacheItem ) : void
static

Clears active extensions list cache

Parameters
Name Type Description
$cacheItem
methodpublicclearAll( bool $cacheList = false ) : bool
static

Clears all cache items.

Parameters
Name Type Description
$cacheList bool
Returns
Type Description
bool True
methodpublicclearByID( array $idList, bool | array $cacheList = false ) : void
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.

Parameters
Name Type Description
$idList array

The cache ID list

$cacheList bool | array

The list of caches, default false

methodpublicclearByTag( string $tagName, bool | array $cacheList = false ) : void
static

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

Parameters
Name Type Description
$tagName string

The tag name

$cacheList bool | array

The list of caches, default false

methodpublicclearClassID(  $cacheItem ) : void
static

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

Parameters
Name Type Description
$cacheItem
methodpublicclearContentCache(  $cacheItem ) : void
static

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

Parameters
Name Type Description
$cacheItem
methodpublicclearContentTreeMenu(  $cacheItem ) : void
static

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.

Parameters
Name Type Description
$cacheItem
methodpublicclearDesignBaseCache( \$cacheItem $cacheItem ) : void
static

Clears the design base cache

Parameters
Name Type Description
$cacheItem \$cacheItem

array the cache item that describes the cache tag/id

methodpublicclearGlobalINICache(  $cacheItem ) : void
static

Clear global ini cache

Parameters
Name Type Description
$cacheItem
methodpublicclearImageAlias(  $cacheItem ) : void
static

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

Parameters
Name Type Description
$cacheItem
methodpublicclearItem( \$cacheItem $cacheItem, \$purge $purge = false, \$reporter $reporter = false, \$iterationSleep $iterationSleep = false, \$iterationMax $iterationMax = false, \$expiry $expiry = false ) : void
static

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
Name Type Description
$cacheItem \$cacheItem

Cache item array taken from fetchList()

$purge \$purge

Controls whether clearing/invalidation or purge is used.

$reporter \$reporter

Callback which is called when the system has purged files from the system, called with filename and purge count as parameters.

$iterationSleep \$iterationSleep

The amount of microseconds to sleep between each purge iteration, false means no sleep.

$iterationMax \$iterationMax

The maximum number of items to purge in one iteration, false means use default limit.

$expiry \$expiry

A 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.

methodpublicclearSortKey(  $cacheItem ) : void
static

Clears all datatype sortkey cache files from var/cache.

Parameters
Name Type Description
$cacheItem
methodpublicclearStateLimitations(  $cacheItem ) : void
static

Clears all state limitation cache files.

Parameters
Name Type Description
$cacheItem
methodpublicclearTSTranslationCache( array $cacheItem ) : void
static

Clears the .ts translation cache

Parameters
Name Type Description
$cacheItem array
methodpublicclearTemplateBlockCache(  $cacheItem ) : void
static

Removes all template block cache files and subtree entries.

Parameters
Name Type Description
$cacheItem
methodpublicclearTemplateOverrideCache(  $cacheItem ) : void
static

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

Parameters
Name Type Description
$cacheItem
Details
Since
4.2  
methodpublicclearTextToImageCache(  $cacheItem ) : void
static

Clear texttoimage cache

Parameters
Name Type Description
$cacheItem
methodpublicclearUserInfoCache(  $cacheItem ) : void
static

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

Parameters
Name Type Description
$cacheItem
methodpublicfetchByID( string $id, array | bool $cacheInfoList = false ) : array
static

Finds the first entry with the ID $id.

Parameters
Name Type Description
$id string

The entry id.

$cacheInfoList array | bool

The list of cache info per entry

Returns
Type Description
array The cache info structure.
methodpublicfetchByIDList( array $idList, array | bool $cacheInfoList = false ) : array
static

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

Parameters
Name Type Description
$idList array

The list of cache ID

$cacheInfoList array | bool

The list of cache info per entry

Returns
Type Description
array An array with cache info structures.
methodpublicfetchByTag( string $tagName, bool | array $cacheInfoList = false ) : array
static

Finds all cache entries using tag $tagName.

Parameters
Name Type Description
$tagName string

The tag name

$cacheInfoList bool | array

The list of cache info per entry

Returns
Type Description
array An array with cache items.
methodpublicfetchIDList( bool | array $cacheInfoList = false ) : array
static

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

Parameters
Name Type Description
$cacheInfoList bool | array

If 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.

Returns
Type Description
array An array with id strings.
methodpublicfetchList( ) : array
static

Return a list of all cache items in the system.

Returns
Type Description
array The list of cache items
methodpublicfetchTagList( bool | array $cacheInfoList = false ) : array
static

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

Parameters
Name Type Description
$cacheInfoList bool | array

If 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.

Returns
Type Description
array An array with tag strings.
methodpublicpurgeImageAlias( array $cacheItem ) : void
static

Purges the image aliases of all ezimage attribute. The original image is kept.

Parameters
Name Type Description
$cacheItem array
Details
Access
public  
methodprivatepurgeImageAliasForObject( array $cacheItem, \eZContentObject $object, array $imageIdentfiers ) : void
static

The purge the image aliases in all versions of the content object.

Parameters
Name Type Description
$cacheItem array
$object \eZContentObject
$imageIdentfiers array

array of ezimage attribute identifiers

methodpublicpurgeTextToImageCache(  $cacheItem ) : void
static

Purge texttoimage cache

Parameters
Name Type Description
$cacheItem
Documentation was generated by DocBlox 0.18.1.