eZ Publish  [trunk]
eZTemplateTreeCache Class Reference

Cache handling for template tree nodes. More...

List of all members.

Static Public Member Functions

static cacheDirectory ()
static cachedTree ($key, $uri, $res, $templatePath, &$extraParameters)
static & cacheTable ()
static canRestoreCache ($key, $timestamp, $templateFilepath)
static isCacheEnabled ()
static restoreCache ($key, $templateFilepath)
static setCachedTree ($originalKey, $uri, $res, $templatePath, &$extraParameters, &$root)
static storeCache ($key, $templateFilepath)
static treeCacheFilename ($key, $templateFilepath)

Public Attributes

const CODE_DATE = 1044440833

Static Private Member Functions

static internalKey ($key)

Detailed Description

Cache handling for template tree nodes.

Definition at line 17 of file eztemplatetreecache.php.


Member Function Documentation

Returns:
the cache directory for tree node cache files.

Definition at line 126 of file eztemplatetreecache.php.

Referenced by canRestoreCache(), restoreCache(), and storeCache().

static eZTemplateTreeCache::cachedTree ( key,
uri,
res,
templatePath,
&$  extraParameters 
) [static]
Returns:
the cache node tree which is stored with the cache key $key. Returns null if no cache data was found.

Definition at line 54 of file eztemplatetreecache.php.

Referenced by eZTemplateFileResource\cachedTemplateTree(), and eZTemplateFileResource\hasCachedProcessTree().

static& eZTemplateTreeCache::cacheTable ( ) [static]
Returns:
the cache table which has cache keys and cache data.

Definition at line 25 of file eztemplatetreecache.php.

Referenced by cachedTree(), canRestoreCache(), restoreCache(), setCachedTree(), and storeCache().

static eZTemplateTreeCache::canRestoreCache ( key,
timestamp,
templateFilepath 
) [static]
Returns:
true if the cache with the key $key can be restored. A cache file is found restorable when it exists and has a timestamp higher or equal to $timestamp.

Definition at line 159 of file eztemplatetreecache.php.

Referenced by eZTemplateFileResource\cachedTemplateTree(), and eZTemplateFileResource\hasCachedProcessTree().

static eZTemplateTreeCache::internalKey ( key) [static, private]
Returns:
a new key from $key which has some additional info.

Definition at line 38 of file eztemplatetreecache.php.

Referenced by cachedTree(), canRestoreCache(), restoreCache(), setCachedTree(), and storeCache().

Returns:
true if template tree node caching is enabled.
Note:
To change this setting edit settings/site.ini and locate the group TemplateSettings and the entry NodeTreeCaching.

Definition at line 105 of file eztemplatetreecache.php.

Referenced by canRestoreCache(), restoreCache(), and storeCache().

static eZTemplateTreeCache::restoreCache ( key,
templateFilepath 
) [static]

Loads the cache with the key $key from a file and sets the result in the cache table.

Returns:
true if the cache was successfully restored.

Definition at line 181 of file eztemplatetreecache.php.

Referenced by eZTemplateFileResource\cachedTemplateTree(), and eZTemplateFileResource\hasCachedProcessTree().

static eZTemplateTreeCache::setCachedTree ( originalKey,
uri,
res,
templatePath,
&$  extraParameters,
&$  root 
) [static]

Sets the template tree node $root to be cached with the cache key $root.

Note:
Trying to overwrite and existing cache key will give a warning and fail.

Definition at line 74 of file eztemplatetreecache.php.

Referenced by eZTemplateFileResource\setCachedTemplateTree().

static eZTemplateTreeCache::storeCache ( key,
templateFilepath 
) [static]

Stores the data of the cache with the key $key to a file.

Returns:
false if the cache does not exist.

Definition at line 212 of file eztemplatetreecache.php.

Referenced by eZTemplateFileResource\setCachedTemplateTree().

static eZTemplateTreeCache::treeCacheFilename ( key,
templateFilepath 
) [static]

Creates the name for the tree cache file and returns it. The name conists of the md5 of the key and charset with the original filename appended.

Definition at line 140 of file eztemplatetreecache.php.

Referenced by canRestoreCache(), restoreCache(), and storeCache().


Member Data Documentation

const eZTemplateTreeCache::CODE_DATE = 1044440833

Definition at line 19 of file eztemplatetreecache.php.

Referenced by restoreCache(), and storeCache().


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