Cache Handler API
package | Smarty |
---|---|
subpackage | Cacher |
author | Rodney Rehm |
acquireLock(\Smarty $smarty, \Smarty_Template_Cached $cached)
clear(\Smarty $smarty, string $resource_name, string $cache_id, string $compile_id, integer $exp_time) : integer
string
template name
string
cache id
string
compile id
integer
expiration time (number of seconds, not timestamp)
integer
number of cache files deletedclearAll(\Smarty $smarty, integer $exp_time) : integer
integer
expiration time (number of seconds, not timestamp)
integer
number of cache files deletedgetCachedContent(\Smarty_Internal_Template $_template)
inherited_from | \Smarty_CacheResource::getCachedContent() |
---|
hasLock(\Smarty $smarty, \Smarty_Template_Cached $cached) : \booelan
\booelan
true or false if cache is lockedinvalidLoadedCache(\Smarty $smarty)
load(\Smarty $smarty, string $type) : \Smarty_CacheResource
inherited_from | \Smarty_CacheResource::load() |
---|
string
name of the cache resource
\Smarty_CacheResource
Cache Resource Handlerlocked(\Smarty $smarty, \Smarty_Template_Cached $cached)
inherited_from | \Smarty_CacheResource::locked() |
---|
populate(\Smarty_Template_Cached $cached, \Smarty_Internal_Template $_template) : void
populateTimestamp(\Smarty_Template_Cached $cached) : void
process(\Smarty_Internal_Template $_template, \Smarty_Template_Cached $cached) : \booelan
\booelan
true or false if the cached content does not existreleaseLock(\Smarty $smarty, \Smarty_Template_Cached $cached)
writeCachedContent(\Smarty_Internal_Template $_template, string $content) : boolean
string
content to cache
boolean
successdelete(string $name, string $cache_id, string $compile_id, integer | null $exp_time) : integer
string
template name
string
cache id
string
compile id
integer
null
seconds till expiration time in seconds or null
integer
number of deleted cachesfetch(string $id, string $name, string $cache_id, string $compile_id, string $content, integer $mtime) : void
string
unique cache content identifier
string
template name
string
cache id
string
compile id
string
cached content
integer
cache modification timestamp (epoch)
fetchTimestamp(string $id, string $name, string $cache_id, string $compile_id) : integer | boolean
{@internal implementing this method is optional. Only implement it if modification times can be accessed faster than loading the complete cached content.}}
string
unique cache content identifier
string
template name
string
cache id
string
compile id
integer
boolean
timestamp (epoch) the template was modified, or false if not foundsave(string $id, string $name, string $cache_id, string $compile_id, integer | null $exp_time, string $content) : boolean
string
unique cache content identifier
string
template name
string
cache id
string
compile id
integer
null
seconds till expiration or null
string
content to cache
boolean
success$resources : array
inherited_from | \Smarty_CacheResource::$$resources |
---|
$sysplugins : array
inherited_from | \Smarty_CacheResource::$$sysplugins |
---|