Methods summary
abstract protected
|
#
fetch( string $id, string $name, string $cache_id, string $compile_id, string & $content, integer & $mtime )
fetch cached content and its modification time from data source
fetch cached content and its modification time from data source
Parameters
- $id
- unique cache content identifier
- $name
- template name
- $cache_id
- cache id
- $compile_id
- compile id
- $content
- cached content
- $mtime
- cache modification timestamp (epoch)
|
protected
integer|boolean
|
#
fetchTimestamp( string $id, string $name, string $cache_id, string $compile_id )
Fetch cached content's modification timestamp from data source
}
Fetch cached content's modification timestamp from data source
}
Parameters
- $id
- unique cache content identifier
- $name
- template name
- $cache_id
- cache id
- $compile_id
- compile id
Returns
integer|boolean timestamp (epoch) the template was modified, or false if not found
|
abstract protected
boolean
|
#
save( string $id, string $name, string $cache_id, string $compile_id, integer|null $exp_time, string $content )
Save content to cache
Parameters
- $id
- unique cache content identifier
- $name
- template name
- $cache_id
- cache id
- $compile_id
- compile id
- $exp_time
- seconds till expiration or null
- $content
- content to cache
Returns
boolean success
|
abstract protected
integer
|
#
delete( string $name, string $cache_id, string $compile_id, integer|null $exp_time )
Delete content from cache
Delete content from cache
Parameters
- $name
- template name
- $cache_id
- cache id
- $compile_id
- compile id
- $exp_time
- seconds till expiration time in seconds or null
Returns
integer number of deleted caches
|
public
|
|
public
|
|
public
boolean
|
#
process( Smarty_Internal_Template $_template, Smarty_Template_Cached $cached = null )
Read the cached template and process the header
Read the cached template and process the header
Parameters
- $_template
- template object
- $cached
- cached object
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
integer
|
#
clearAll( Smarty $smarty, integer $exp_time = null )
Empty cache
Parameters
- $smarty
- Smarty object
- $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
- Smarty object
- $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
|