PHP Class Smarty_CacheResource_Newscoop

Inheritance: extends Smarty_CacheResource_Custom
Afficher le fichier Open project: sourcefabric/newscoop Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( )
populateTimestamp ( Smarty_Template_Cached $cached ) : void populate Cached Object with timestamp and exists from Resource
writeCachedContent ( Smarty_Internal_Template $_template, string $content ) : boolean Write the rendered template output to cache

Méthodes protégées

Méthode Description
delete ( string $tpl_name, string $cache_id, string $compile_id, integer | null $exp_time ) : integer Delete content from cache
fetch ( string $id, string $tpl_name, string $cache_id, string $compile_id, string &$content, integer &$mtime, integer $cacheLifetime ) : void fetch cached content and its modification time from data source
save ( string $id, string $tpl_name, string $cache_id, string $compile_id, integer | null $exp_time, string $content, array $campsiteVector = [] ) : boolean Save content to cache

Method Details

__construct() public méthode

public __construct ( )

delete() protected méthode

Delete content from cache
protected delete ( string $tpl_name, string $cache_id, string $compile_id, integer | null $exp_time ) : integer
$tpl_name string template name
$cache_id string cache id
$compile_id string compile id
$exp_time integer | null seconds till expiration time in seconds or null
Résultat integer number of deleted caches

fetch() protected méthode

fetch cached content and its modification time from data source
protected fetch ( string $id, string $tpl_name, string $cache_id, string $compile_id, string &$content, integer &$mtime, integer $cacheLifetime ) : void
$id string unique cache content identifier
$tpl_name string template name
$cache_id string cache id
$compile_id string compile id
$content string cached content
$mtime integer cache modification timestamp (epoch)
$cacheLifetime integer cache lifetime in seconds
Résultat void

populateTimestamp() public méthode

populate Cached Object with timestamp and exists from Resource
public populateTimestamp ( Smarty_Template_Cached $cached ) : void
$cached Smarty_Template_Cached
Résultat void

save() protected méthode

Save content to cache
protected save ( string $id, string $tpl_name, string $cache_id, string $compile_id, integer | null $exp_time, string $content, array $campsiteVector = [] ) : boolean
$id string unique cache content identifier
$tpl_name string template name
$cache_id string cache id
$compile_id string compile id
$exp_time integer | null seconds till expiration or null
$content string content to cache
$campsiteVector array Newscoop's CampsiteVector for defining which page is being cached
Résultat boolean success

writeCachedContent() public méthode

Write the rendered template output to cache
public writeCachedContent ( Smarty_Internal_Template $_template, string $content ) : boolean
$_template Smarty_Internal_Template template object
$content string content to cache
Résultat boolean success