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
stringtemplate name
stringcache id
stringcompile id
integerexpiration time (number of seconds, not timestamp)
integernumber of cache files deletedclearAll(\Smarty $smarty, integer $exp_time) : integer
integerexpiration time (number of seconds, not timestamp)
integernumber of cache files deletedgetCachedContent(\Smarty_Internal_Template $_template)
| inherited_from | \Smarty_CacheResource::getCachedContent() |
|---|
hasLock(\Smarty $smarty, \Smarty_Template_Cached $cached) : \booelan
\booelantrue or false if cache is lockedinvalidLoadedCache(\Smarty $smarty)
load(\Smarty $smarty, string $type) : \Smarty_CacheResource
| inherited_from | \Smarty_CacheResource::load() |
|---|
stringname of the cache resource
\Smarty_CacheResourceCache 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
\booelantrue or false if the cached content does not existreleaseLock(\Smarty $smarty, \Smarty_Template_Cached $cached)
writeCachedContent(\Smarty_Internal_Template $_template, string $content) : boolean
stringcontent to cache
booleansuccessdelete(string $name, string $cache_id, string $compile_id, integer | null $exp_time) : integer
stringtemplate name
stringcache id
stringcompile id
integernullseconds till expiration time in seconds or null
integernumber of deleted cachesfetch(string $id, string $name, string $cache_id, string $compile_id, string $content, integer $mtime) : void
stringunique cache content identifier
stringtemplate name
stringcache id
stringcompile id
stringcached content
integercache 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.}}
stringunique cache content identifier
stringtemplate name
stringcache id
stringcompile id
integerbooleantimestamp (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
stringunique cache content identifier
stringtemplate name
stringcache id
stringcompile id
integernullseconds till expiration or null
stringcontent to cache
booleansuccess$resources : array
| inherited_from | \Smarty_CacheResource::$$resources |
|---|
$sysplugins : array
| inherited_from | \Smarty_CacheResource::$$sysplugins |
|---|