Class 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.
-
Smarty_CacheResource
-
Smarty_Internal_CacheResource_File
Package: Smarty\Cacher
Author:
Uwe Tews
Author:
Rodney Rehm
Located at tpl/smarty/sysplugins/smarty_internal_cacheresource_file.php
Methods summary
public
|
#
populate( Smarty_Template_Cached $cached, Smarty_Internal_Template $_template )
populate Cached Object with meta data from Resource
populate Cached Object with meta data from Resource
Parameters
- $cached
- cached object
- $_template
- template object
|
public
|
#
populateTimestamp( Smarty_Template_Cached $cached )
populate Cached Object with timestamp and exists from Resource
populate Cached Object with timestamp and exists from Resource
Parameters
|
public
boolean
|
#
process( Smarty_Internal_Template $_smarty_tpl, Smarty_Template_Cached $cached = null, boolean $update = false )
Read the cached template and process its header
Read the cached template and process its header
Parameters
- $_smarty_tpl
- do not change variable name, is used by compiled template
- $cached
- cached object
- $update
- flag if called because cache update
Returns
boolean true or false if the cached content does not exist
|
public
boolean
|
#
writeCachedContent( Smarty_Internal_Template $_template, string $content )
Write the rendered template output to cache
Write the rendered template output to cache
Parameters
- $_template
- template object
- $content
- content to cache
Returns
boolean success
|
public
string
|
#
readCachedContent( Smarty_Internal_Template $_template )
Read cached template from cache
Read cached template from cache
Parameters
- $_template
- template object
Returns
string content
|
public
integer
|
#
clearAll( Smarty $smarty, integer $exp_time = null )
Empty cache
Parameters
- $smarty
- $exp_time
- expiration time (number of seconds, not timestamp)
Returns
integer number of cache files deleted
|
public
integer
|
#
clear( Smarty $smarty, string $resource_name, string $cache_id, string $compile_id, integer $exp_time )
Empty cache for a specific template
Empty cache for a specific template
Parameters
- $smarty
- $resource_name
- template name
- $cache_id
- cache id
- $compile_id
- compile id
- $exp_time
- expiration time (number of seconds, not timestamp)
Returns
integer number of cache files deleted
|
public
boolean
|
#
hasLock( Smarty $smarty, Smarty_Template_Cached $cached )
Check is cache is locked for this template
Check is cache is locked for this template
Parameters
- $smarty
- Smarty object
- $cached
- cached object
Returns
boolean true or false if cache is locked
Overrides
|
public
boolean|
|
#
acquireLock( Smarty $smarty, Smarty_Template_Cached $cached )
Lock cache for this template
Lock cache for this template
Parameters
- $smarty
- Smarty object
- $cached
- cached object
Returns
boolean|
Overrides
|
public
boolean|
|
#
releaseLock( Smarty $smarty, Smarty_Template_Cached $cached )
Unlock cache for this template
Unlock cache for this template
Parameters
- $smarty
- Smarty object
- $cached
- cached object
Returns
boolean|
Overrides
|