Class patTemplate_TemplateCache

Description

Base class for patTemplate template cache

$Id: TemplateCache.php,v 1.6 2004/05/25 20:38:38 schst Exp $

A template cache is used to cache the data after the template has been read, but before the variables have been added.

Data is normally stored in serialized format. This will increase performance.

This is not related to an output cache!

Located in /includes/patTemplate/patTemplate/TemplateCache.php (line 40)

patTemplate_Module
   |
   --patTemplate_TemplateCache
Direct descendents
Class Description
patTemplate_TemplateCache_File patTemplate Template cache that stores data on filesystem
Method Summary
string getKey (mixed $input, [array $options = array()])
array|boolean load (string $key, [integer $modTime = -1])
void write (string $key, array $templates)
Variables
Methods
getKey (line 75)

get the cache key for the input

  • return: key
string getKey (mixed $input, [array $options = array()])
  • mixed $input: input to read from. This can be a string, a filename, a resource or whatever the derived class needs to read from
  • array $options: options
load (line 50)

load template from cache

  • return: either an array containing the templates or false cache could not be loaded
  • access: public
array|boolean load (string $key, [integer $modTime = -1])
  • string $key: cache key
  • integer $modTime: modification time of original template

Redefined in descendants as:
write (line 62)

write template to cache

  • access: public
void write (string $key, array $templates)
  • string $key: cache key
  • array $templates: templates to store

Redefined in descendants as:

Inherited Methods

Inherited From patTemplate_Module

patTemplate_Module::getName()
patTemplate_Module::getParam()
patTemplate_Module::setParams()

Documentation generated on Fri, 4 Mar 2005 13:57:19 +1000 by phpDocumentor 1.3.0RC3