eZPublish  3.8
eZTranslationCache Class Reference

Cache handling for translations. More...

Static Public Member Functions

 cacheDirectory ()
 
cacheTable ()
 
 canRestoreCache ($key, $timestamp)
 
 contextCache ($contextName)
 
 restoreCache ($key)
 
 setContextCache ($contextName, $context)
 
 storeCache ($key)
 

Detailed Description

Cache handling for translations.

Member Function Documentation

eZTranslationCache::cacheDirectory ( )
static
Returns
the cache directory for translation cache files.

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

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

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

eZTranslationCache::canRestoreCache (   $key,
  $timestamp 
)
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 eZTSTranslator\loadTranslationFile().

eZTranslationCache::contextCache (   $contextName)
static
Returns
the cache translation context which is stored with the cache key $contextName. Returns null if no cache data was found.

Referenced by eZTSTranslator\loadTranslationFile().

eZTranslationCache::restoreCache (   $key)
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 eZTSTranslator\loadTranslationFile().

eZTranslationCache::setContextCache (   $contextName,
  $context 
)
static

Sets the translation context $context to be cached with the cache key $contextName.

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

Referenced by eZTSTranslator\loadTranslationFile().

eZTranslationCache::storeCache (   $key)
static

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

Returns
false if the cache does not exist.

Referenced by eZTSTranslator\loadTranslationFile().


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