eZPublish  4.5
eZTemplateTreeCache Class Reference

Cache handling for template tree nodes. More...

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.

Member Function Documentation

static eZTemplateTreeCache::cacheDirectory ( )
static
Returns
the cache directory for tree node cache files.

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.

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

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

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.

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

static eZTemplateTreeCache::internalKey (   $key)
staticprivate
Returns
a new key from $key which has some additional info.

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

static eZTemplateTreeCache::isCacheEnabled ( )
static
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.

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.

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.

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.

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.

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

Member Data Documentation

const eZTemplateTreeCache::CODE_DATE = 1044440833

Referenced by restoreCache(), and storeCache().


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