Class Smarty_CacheResource

Description

Cache Handler API

  • author: Rodney Rehm
  • abstract:

Located in /libs/sysplugins/smarty_cacheresource.php (line 16)


	
			
Direct descendents
Class Description
Smarty_CacheResource_Custom Cache Handler API
Smarty_CacheResource_KeyValueStore Smarty Cache Handler Base for Key/Value Storage Implementations
Smarty_Internal_CacheResource_File This class does contain all necessary methods for the HTML cache on file system
Variable Summary
static array $resources
static array $sysplugins
Method Summary
static void invalidLoadedCache (Smarty $smarty)
static Smarty_CacheResource load (Smarty $smarty, [string $type = null])
void acquireLock (Smarty $smarty, Smarty_Template_Cached $cached)
integer clear (Smarty $smarty, string $resource_name, string $cache_id, string $compile_id, integer $exp_time)
integer clearAll (Smarty $smarty, [integer $exp_time = null])
void getCachedContent (Smarty_Internal_Template $_template, string $content)
void hasLock (Smarty $smarty, Smarty_Template_Cached $cached)
void locked (Smarty $smarty, Smarty_Template_Cached $cached)
booelan process (Smarty_Internal_Template $_template, [Smarty_Template_Cached $cached = null])
void releaseLock (Smarty $smarty, Smarty_Template_Cached $cached)
boolean writeCachedContent (Smarty_Internal_Template $_template, string $content)
Variables
static array $resources = array() (line 21)

cache for Smarty_CacheResource instances

  • access: protected
static array $sysplugins = array(
'file' => true,
)
(line 27)

resource types provided by the core

  • access: protected
Methods
static method invalidLoadedCache (line 179)

Invalid Loaded Cache Files

  • access: public
static void invalidLoadedCache (Smarty $smarty)
  • Smarty $smarty: Smarty object
static method load (line 146)

Load Cache Resource Handler

  • return: Cache Resource Handler
  • access: public
static Smarty_CacheResource load (Smarty $smarty, [string $type = null])
  • Smarty $smarty: Smarty object
  • string $type: name of the cache resource
acquireLock (line 126)
  • access: public
void acquireLock (Smarty $smarty, Smarty_Template_Cached $cached)

Redefined in descendants as:
clear (line 101)

Empty cache for a specific template

  • return: number of cache files deleted
  • abstract:
  • access: public
integer clear (Smarty $smarty, string $resource_name, string $cache_id, string $compile_id, integer $exp_time)
  • Smarty $smarty: Smarty object
  • string $resource_name: template name
  • string $cache_id: cache id
  • string $compile_id: compile id
  • integer $exp_time: expiration time (number of seconds, not timestamp)

Redefined in descendants as:
clearAll (line 89)

Empty cache

  • return: number of cache files deleted
  • abstract:
  • access: public
integer clearAll (Smarty $smarty, [integer $exp_time = null])
  • Smarty $smarty: Smarty object
  • integer $exp_time: expiration time (number of seconds, not timestamp)

Redefined in descendants as:
getCachedContent (line 72)

Return cached content

  • access: public
void getCachedContent (Smarty_Internal_Template $_template, string $content)
hasLock (line 120)
  • access: public
void hasLock (Smarty $smarty, Smarty_Template_Cached $cached)

Redefined in descendants as:
locked (line 104)
  • access: public
void locked (Smarty $smarty, Smarty_Template_Cached $cached)
populate (line 38)

populate Cached Object with meta data from Resource

  • abstract:
  • access: public
void populate (Smarty_Template_Cached $cached, Smarty_Internal_Template $_template)

Redefined in descendants as:
populateTimestamp (line 46)

populate Cached Object with timestamp and exists from Resource

  • abstract:
  • access: public
void populateTimestamp (Smarty_Template_Cached $cached, Smarty_Template_Cached $source)

Redefined in descendants as:
process (line 55)

Read the cached template and process header

  • return: true or false if the cached content does not exist
  • abstract:
  • access: public
booelan process (Smarty_Internal_Template $_template, [Smarty_Template_Cached $cached = null])

Redefined in descendants as:
releaseLock (line 132)
  • access: public
void releaseLock (Smarty $smarty, Smarty_Template_Cached $cached)

Redefined in descendants as:
writeCachedContent (line 64)

Write the rendered template output to cache

  • return: success
  • abstract:
  • access: public
boolean writeCachedContent (Smarty_Internal_Template $_template, string $content)

Redefined in descendants as:

Documentation generated on Sat, 24 Sep 2011 20:23:31 +0200 by phpDocumentor 1.4.1