\Smarty_Internal_CacheResource_File

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.

Summary

Methods
Properties
Constants
populate()
populateTimestamp()
process()
writeCachedContent()
getCachedContent()
clearAll()
clear()
locked()
hasLock()
acquireLock()
releaseLock()
load()
invalidLoadedCache()
$resources
No constants found
No protected methods found
$sysplugins
N/A
No private methods found
No private properties found
N/A

Properties

$resources

$resources : array

cache for Smarty_CacheResource instances

Type

array

$sysplugins

$sysplugins : array

resource types provided by the core

Type

array

Methods

populate()

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

populate Cached Object with meta data from Resource

Parameters

\Smarty_Template_Cached $cached

cached object

\Smarty_Internal_Template $_template

template object

populateTimestamp()

populateTimestamp(\Smarty_Template_Cached  $cached) : void

populate Cached Object with timestamp and exists from Resource

Parameters

\Smarty_Template_Cached $cached

cached object

process()

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

Read the cached template and process its header

Parameters

\Smarty_Internal_Template $_template

template object

\Smarty_Template_Cached $cached

cached object

Returns

\booelan —

true or false if the cached content does not exist

writeCachedContent()

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

Write the rendered template output to cache

Parameters

\Smarty_Internal_Template $_template

template object

string $content

content to cache

Returns

boolean —

success

getCachedContent()

getCachedContent(\Smarty_Internal_Template  $_template) 

Return cached content

Parameters

\Smarty_Internal_Template $_template

template object

clearAll()

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

Empty cache

Parameters

\Smarty $smarty

Smarty object

integer $exp_time

expiration time (number of seconds, not timestamp)

Returns

integer —

number of cache files deleted

clear()

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

Empty cache for a specific template

Parameters

\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)

Returns

integer —

number of cache files deleted

hasLock()

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

Check is cache is locked for this template

Parameters

\Smarty $smarty

Smarty object

\Smarty_Template_Cached $cached

cached object

Returns

\booelan —

true or false if cache is locked

acquireLock()

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

Lock cache for this template

Parameters

\Smarty $smarty

Smarty object

\Smarty_Template_Cached $cached

cached object

releaseLock()

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

Unlock cache for this template

Parameters

\Smarty $smarty

Smarty object

\Smarty_Template_Cached $cached

cached object

load()

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

Load Cache Resource Handler

Parameters

\Smarty $smarty

Smarty object

string $type

name of the cache resource

Returns

\Smarty_CacheResource

Cache Resource Handler

invalidLoadedCache()

invalidLoadedCache(\Smarty  $smarty) 

Invalid Loaded Cache Files

Parameters

\Smarty $smarty

Smarty object