Cache Handler API

package Smarty
subpackage Cacher
author Rodney Rehm

 Methods

acquireLock()

acquireLock(\Smarty $smarty, \Smarty_Template_Cached $cached) 

Parameters

$smarty

$cached

Empty cache for a specific template

clear(\Smarty $smarty, string $resource_name, string $cache_id, string $compile_id, integer $exp_time) : integer

Parameters

$smarty

\Smarty

Smarty object

$resource_name

string

template name

$cache_id

string

cache id

$compile_id

string

compile id

$exp_time

integer

expiration time (number of seconds, not timestamp)

Returns

integernumber of cache files deleted

Empty cache

clearAll(\Smarty $smarty, integer $exp_time) : integer

Parameters

$smarty

\Smarty

Smarty object

$exp_time

integer

expiration time (number of seconds, not timestamp)

Returns

integernumber of cache files deleted

Return cached content

getCachedContent(\Smarty_Internal_Template $_template) 

Parameters

$_template

\Smarty_Internal_Template

template object

hasLock()

hasLock(\Smarty $smarty, \Smarty_Template_Cached $cached) 

Parameters

$smarty

$cached

Invalid Loaded Cache Files

invalidLoadedCache(\Smarty $smarty) 
Static

Parameters

$smarty

\Smarty

Smarty object

Load Cache Resource Handler

load(\Smarty $smarty, string $type) : \Smarty_CacheResource
Static

Parameters

$smarty

\Smarty

Smarty object

$type

string

name of the cache resource

Returns

\Smarty_CacheResourceCache Resource Handler

locked()

locked(\Smarty $smarty, \Smarty_Template_Cached $cached) 

Parameters

$smarty

$cached

populate Cached Object with meta data from Resource

populate(\Smarty_Template_Cached $cached, \Smarty_Internal_Template $_template) : void

Parameters

$cached

\Smarty_Template_Cached

cached object

$_template

\Smarty_Internal_Template

template object

populate Cached Object with timestamp and exists from Resource

populateTimestamp(\Smarty_Template_Cached $cached) : void

Parameters

$cached

Read the cached template and process header

process(\Smarty_Internal_Template $_template, \Smarty_Template_Cached $cached) : \booelan

Parameters

$_template

\Smarty_Internal_Template

template object

$cached

\Smarty_Template_Cached

cached object

Returns

\booelantrue or false if the cached content does not exist

releaseLock()

releaseLock(\Smarty $smarty, \Smarty_Template_Cached $cached) 

Parameters

$smarty

$cached

Write the rendered template output to cache

writeCachedContent(\Smarty_Internal_Template $_template, string $content) : boolean

Parameters

$_template

\Smarty_Internal_Template

template object

$content

string

content to cache

Returns

booleansuccess

 Properties

 

$resources : array
 

$sysplugins : array