Class Smarty_CacheResource_Custom

Description

Cache Handler API

  • author: Rodney Rehm
  • abstract:

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

Smarty_CacheResource
   |
   --Smarty_CacheResource_Custom
Direct descendents
Class Description
Smarty_CacheResource_Mysql MySQL CacheResource
Method Summary
integer clear (Smarty $smarty, string $resource_name, string $cache_id, string $compile_id, integer $exp_time)
integer clearAll (Smarty $smarty, [integer $exp_time = null])
integer delete (string $name, string $cache_id, string $compile_id, integer|null $exp_time)
void fetch (string $id, string $name, string $cache_id, string $compile_id,  &$content,  &$mtime, string $content, integer $mtime)
integer|boolean fetchTimestamp (string $id, string $name, string $cache_id, string $compile_id)
booelan process (Smarty_Internal_Template $_template, [Smarty_Template_Cached $cached = null])
boolean save (string $id, string $name, string $cache_id, string $compile_id, integer|null $exp_time, string $content)
boolean writeCachedContent (Smarty_Internal_Template $_template, string $content)
Variables
Methods
clear (line 182)

Empty cache for a specific template

  • return: number of cache files deleted
  • 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)

Redefinition of:
Smarty_CacheResource::clear()
Empty cache for a specific template
clearAll (line 166)

Empty cache

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

Redefinition of:
Smarty_CacheResource::clearAll()
Empty cache
delete (line 70)

Delete content from cache

  • return: number of deleted caches
  • abstract:
  • access: protected
integer delete (string $name, string $cache_id, string $compile_id, integer|null $exp_time)
  • string $name: template name
  • string $cache_id: cache id
  • string $compile_id: compile id
  • integer|null $exp_time: seconds till expiration time in seconds or null

Redefined in descendants as:
fetch (line 29)

fetch cached content and its modification time from data source

  • abstract:
  • access: protected
void fetch (string $id, string $name, string $cache_id, string $compile_id,  &$content,  &$mtime, string $content, integer $mtime)
  • string $id: unique cache content identifier
  • string $name: template name
  • string $cache_id: cache id
  • string $compile_id: compile id
  • string $content: cached content
  • integer $mtime: cache modification timestamp (epoch)
  • &$content
  • &$mtime

Redefined in descendants as:
fetchTimestamp (line 43)

Fetch cached content's modification timestamp from data source

  • return: timestamp (epoch) the template was modified, or false if not found
  • access: protected
integer|boolean fetchTimestamp (string $id, string $name, string $cache_id, string $compile_id)
  • string $id: unique cache content identifier
  • string $name: template name
  • string $cache_id: cache id
  • string $compile_id: compile id

Redefined in descendants as:
populate (line 79)

populate Cached Object with meta data from Resource

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

Redefinition of:
Smarty_CacheResource::populate()
populate Cached Object with meta data from Resource
populateTimestamp (line 94)

populate Cached Object with timestamp and exists from Resource

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

Redefinition of:
Smarty_CacheResource::populateTimestamp()
populate Cached Object with timestamp and exists from Resource
process (line 115)

Read the cached template and process the header

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

Redefinition of:
Smarty_CacheResource::process()
Read the cached template and process header
save (line 59)

Save content to cache

  • return: success
  • abstract:
  • access: protected
boolean save (string $id, string $name, string $cache_id, string $compile_id, integer|null $exp_time, string $content)
  • string $id: unique cache content identifier
  • string $name: template name
  • string $cache_id: cache id
  • string $compile_id: compile id
  • integer|null $exp_time: seconds till expiration or null
  • string $content: content to cache

Redefined in descendants as:
writeCachedContent (line 147)

Write the rendered template output to cache

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

Redefinition of:
Smarty_CacheResource::writeCachedContent()
Write the rendered template output to cache

Inherited Methods

Inherited From Smarty_CacheResource

Smarty_CacheResource::acquireLock()
Smarty_CacheResource::clear()
Smarty_CacheResource::clearAll()
Smarty_CacheResource::getCachedContent()
Smarty_CacheResource::hasLock()
Smarty_CacheResource::invalidLoadedCache()
Smarty_CacheResource::load()
Smarty_CacheResource::locked()
Smarty_CacheResource::populate()
Smarty_CacheResource::populateTimestamp()
Smarty_CacheResource::process()
Smarty_CacheResource::releaseLock()
Smarty_CacheResource::writeCachedContent()

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