\patTemplate_TemplateCache_Jomres

patTemplate Template cache that stores data on filesystem

$Id: File.php 424 2006-02-26 12:31:00Z schst $

Possible parameters for the cache are:

  • cacheFolder : set the folder from which to load the cache
  • lifetime : seconds for which the cache is valid, if set to auto, it will check whether the cache is older than the original file (if the reader supports this)
  • prefix for the filenames

Summary

Methods
Properties
Constants
load()
write()
getKey()
getName()
setParams()
getParam()
_getCachefileName()
$_name
$_params
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$_name

$_name : string

module name

This has to be set in the final module classes.

Type

string

$_params

$_params : array

parameters of the cache

Type

array

Methods

load()

load(  $key,   $modTime = -1) : array|boolean

load template from cache

Parameters

$key
$modTime

Returns

array|boolean —

either an array containing the templates or false cache could not be loaded

write()

write(  $key,   $templates) : boolean

write template to cache

Parameters

$key
$templates

Returns

boolean —

true on success

getKey()

getKey(  $input,   $options = array()) : string

get the cache key for the input

Parameters

$input
$options

Returns

string —

key

getName()

getName() : string

get the name of the module

Returns

string —

name of the module

setParams()

setParams(  $params,   $clear = false) 

sets parameters of the module

Parameters

$params
$clear

getParam()

getParam(  $name) : mixed

gets a parameter of the module

Parameters

$name

Returns

mixed —

value of the parameter

_getCachefileName()

_getCachefileName(  $key) : string

get the cache filename

Parameters

$key

Returns

string —

cache file name