This class does contain all necessary methods for the HTML cache on file system

Implements the file system as resource for the HTML cache Version ussing nocache inserts.

package Smarty
subpackage Cacher
author Rodney Rehm

 Methods

Lock cache for this template

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

Parameters

$smarty

\Smarty

Smarty object

$cached

\Smarty_Template_Cached

cached object

Empty cache for a specific template

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

Parameters

$smarty

$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

$exp_time

integer

expiration time (number of seconds, not timestamp)

Returns

integernumber of cache files deleted

Return cached content

getCachedContent(\Smarty_Internal_Template $_template) 
Inherited
inherited_from \Smarty_CacheResource::getCachedContent()

Parameters

$_template

\Smarty_Internal_Template

template object

Check is cache is locked for this template

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

Parameters

$smarty

\Smarty

Smarty object

$cached

\Smarty_Template_Cached

cached object

Returns

\booelantrue or false if cache is locked

Invalid Loaded Cache Files

invalidLoadedCache(\Smarty $smarty) 
InheritedStatic
inherited_from \Smarty_CacheResource::invalidLoadedCache()

Parameters

$smarty

\Smarty

Smarty object

Load Cache Resource Handler

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

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) 
Inherited
inherited_from \Smarty_CacheResource::locked()

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

\Smarty_Template_Cached

cached object

Read the cached template and process its 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

Unlock cache for this template

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

Parameters

$smarty

\Smarty

Smarty object

$cached

\Smarty_Template_Cached

cached object

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
Inherited
inherited_from \Smarty_CacheResource::$$resources
 

$sysplugins : array
Inherited
inherited_from \Smarty_CacheResource::$$sysplugins