kernel/classes/ezcache.php
File containing the {@link eZCache} class
- Copyright
- Copyright (C) 1999-2011 eZ Systems AS. All rights reserved.
- License
- eZ Proprietary Use License v1.0
- Package
- kernel
Functions
eZCacheClearClassID(
$cacheItem
)
:
voidHelper function for eZCache::clearClassID.
Static functions in classes cannot be used as callback functions in PHP 4, that is why we need this helper.
| Name | Type | Description |
|---|---|---|
| $cacheItem |
- Deprecated
- Callback to static class function is now done directly.
eZCacheClearContentTreeMenu(
$cacheItem
)
:
voidHelper function for eZCache::clearContentTreeMenu.
Static functions in classes cannot be used as callback functions in PHP 4, that is why we need this helper.
| Name | Type | Description |
|---|---|---|
| $cacheItem |
- Deprecated
- Callback to static class function is now done directly.
eZCacheClearGlobalINI(
$cacheItem
)
:
voidHelper function for eZCache::clearGlobalINICache.
Static functions in classes cannot be used as callback functions in PHP 4, that is why we need this helper.
| Name | Type | Description |
|---|---|---|
| $cacheItem |
- Deprecated
- Callback to static class function is now done directly.
eZCacheClearImageAlias(
$cacheItem
)
:
voidHelper function for eZCache::clearImageAlias.
Static functions in classes cannot be used as callback functions in PHP 4, that is why we need this helper.
| Name | Type | Description |
|---|---|---|
| $cacheItem |
- Deprecated
- Callback to static class function is now done directly.
eZCacheClearSortKey(
$cacheItem
)
:
voidHelper function for eZCache::clearSortKey.
Static functions in classes cannot be used as callback functions in PHP 4, that is why we need this helper.
| Name | Type | Description |
|---|---|---|
| $cacheItem |
- Deprecated
- Callback to static class function is now done directly.
eZCacheClearTemplateBlockCache(
$cacheItem
)
:
voidHelper function for eZCache::clearTemplateBlockCache.
Static functions in classes cannot be used as callback functions in PHP 4, that is why we need this helper.
| Name | Type | Description |
|---|---|---|
| $cacheItem |
- Deprecated
- Callback to static class function is now done directly.
\eZCache
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

clearActiveExtensions(
$cacheItem
)
:
voidClears active extensions list cache
| Name | Type | Description |
|---|---|---|
| $cacheItem |

clearAll(
bool $cacheList
=
false
)
:
boolClears all cache items.
| Name | Type | Description |
|---|---|---|
| $cacheList | bool |
| Type | Description |
|---|---|
| bool | True |

clearByID(
array $idList, bool | array $cacheList
=
false
)
:
voidFinds all cache item which has ID equal to one of the IDs in $idList.
You can also submit a single id to $idList.
| Name | Type | Description |
|---|---|---|
| $idList | array | The cache ID list |
| $cacheList | bool | array | The list of caches, default false |

clearByTag(
string $tagName, bool | array $cacheList
=
false
)
:
voidFinds all cache item which has the tag \a $tagName and clears them.
| Name | Type | Description |
|---|---|---|
| $tagName | string | The tag name |
| $cacheList | bool | array | The list of caches, default false |

clearClassID(
$cacheItem
)
:
voidClears all content class identifier cache files from var/cache.
| Name | Type | Description |
|---|---|---|
| $cacheItem |

clearContentCache(
$cacheItem
)
:
voidClears all content caches by setting a new expiry value for the key *content-view-cache*.
| Name | Type | Description |
|---|---|---|
| $cacheItem |

clearContentTreeMenu(
$cacheItem
)
:
voidSets 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.
| Name | Type | Description |
|---|---|---|
| $cacheItem |

clearDesignBaseCache(
\$cacheItem $cacheItem
)
:
voidClears the design base cache
| Name | Type | Description |
|---|---|---|
| $cacheItem | \$cacheItem | array the cache item that describes the cache tag/id |

clearGlobalINICache(
$cacheItem
)
:
voidClear global ini cache
| Name | Type | Description |
|---|---|---|
| $cacheItem |

clearImageAlias(
$cacheItem
)
:
voidSets the image alias timestamp to the current timestamp, this causes all image aliases to be recreated on viewing.
| Name | Type | Description |
|---|---|---|
| $cacheItem |

clearItem(
\$cacheItem $cacheItem, \$purge $purge
=
false, \$reporter $reporter
=
false, \$iterationSleep $iterationSleep
=
false, \$iterationMax $iterationMax
=
false, \$expiry $expiry
=
false
)
:
voidClears 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.
| 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. |

clearSortKey(
$cacheItem
)
:
voidClears all datatype sortkey cache files from var/cache.
| Name | Type | Description |
|---|---|---|
| $cacheItem |

clearStateLimitations(
$cacheItem
)
:
voidClears all state limitation cache files.
| Name | Type | Description |
|---|---|---|
| $cacheItem |

clearTSTranslationCache(
array $cacheItem
)
:
voidClears the .ts translation cache
| Name | Type | Description |
|---|---|---|
| $cacheItem | array |

clearTemplateBlockCache(
$cacheItem
)
:
voidRemoves all template block cache files and subtree entries.
| Name | Type | Description |
|---|---|---|
| $cacheItem |

clearTemplateOverrideCache(
$cacheItem
)
:
voidRemoves all template override cache files, subtree entries and clears in memory override cache.
| Name | Type | Description |
|---|---|---|
| $cacheItem |
- Since
- 4.2

clearTextToImageCache(
$cacheItem
)
:
voidClear texttoimage cache
| Name | Type | Description |
|---|---|---|
| $cacheItem |

clearUserInfoCache(
$cacheItem
)
:
voidClears all user-info caches by setting a new expiry value for the key *user-info-cache*.
| Name | Type | Description |
|---|---|---|
| $cacheItem |

fetchByID(
string $id, array | bool $cacheInfoList
=
false
)
:
arrayFinds the first entry with the ID $id.
| Name | Type | Description |
|---|---|---|
| $id | string | The entry id. |
| $cacheInfoList | array | bool | The list of cache info per entry |
| Type | Description |
|---|---|
| array | The cache info structure. |

fetchByIDList(
array $idList, array | bool $cacheInfoList
=
false
)
:
arrayFinds the entries matching and ID in the list \a $idList.
| Name | Type | Description |
|---|---|---|
| $idList | array | The list of cache ID |
| $cacheInfoList | array | bool | The list of cache info per entry |
| Type | Description |
|---|---|
| array | An array with cache info structures. |

fetchByTag(
string $tagName, bool | array $cacheInfoList
=
false
)
:
arrayFinds all cache entries using tag $tagName.
| Name | Type | Description |
|---|---|---|
| $tagName | string | The tag name |
| $cacheInfoList | bool | array | The list of cache info per entry |
| Type | Description |
|---|---|
| array | An array with cache items. |

fetchIDList(
bool | array $cacheInfoList
=
false
)
:
arrayGoes through the cache info list $cacheInfoList and finds all the unique ids.
| 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. |
| Type | Description |
|---|---|
| array | An array with id strings. |

fetchList(
)
:
arrayReturn a list of all cache items in the system.
| Type | Description |
|---|---|
| array | The list of cache items |

fetchTagList(
bool | array $cacheInfoList
=
false
)
:
arrayGoes through the cache info list $cacheInfoList and finds all the unique tags.
| 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. |
| Type | Description |
|---|---|
| array | An array with tag strings. |