ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
Twig_CacheInterface Interface Reference

Interface implemented by cache classes. More...

+ Inheritance diagram for Twig_CacheInterface:
+ Collaboration diagram for Twig_CacheInterface:

Public Member Functions

 generateKey ($name, $className)
 Generates a cache key for the given template class name. More...
 
 write ($key, $content)
 Writes the compiled template to cache. More...
 
 load ($key)
 Loads a template from the cache. More...
 
 getTimestamp ($key)
 Returns the modification timestamp of a key. More...
 

Detailed Description

Interface implemented by cache classes.

It is highly recommended to always store templates on the filesystem to benefit from the PHP opcode cache. This interface is mostly useful if you need to implement a custom strategy for storing templates on the filesystem.

Author
Andrew Tch andre.nosp@m.w@no.nosp@m.op.lv

Definition at line 21 of file CacheInterface.php.

Member Function Documentation

◆ generateKey()

Twig_CacheInterface::generateKey (   $name,
  $className 
)

Generates a cache key for the given template class name.

Parameters
string$nameThe template name
string$classNameThe template class name
Returns
string

Implemented in Twig_Cache_Filesystem, and Twig_Cache_Null.

◆ getTimestamp()

Twig_CacheInterface::getTimestamp (   $key)

Returns the modification timestamp of a key.

Parameters
string$keyThe cache key
Returns
int

Implemented in Twig_Cache_Filesystem, and Twig_Cache_Null.

◆ load()

Twig_CacheInterface::load (   $key)

Loads a template from the cache.

Parameters
string$keyThe cache key

Implemented in Twig_Cache_Filesystem, and Twig_Cache_Null.

◆ write()

Twig_CacheInterface::write (   $key,
  $content 
)

Writes the compiled template to cache.

Parameters
string$keyThe cache key
string$contentThe template representation as a PHP class

Implemented in Twig_Cache_Filesystem, and Twig_Cache_Null.


The documentation for this interface was generated from the following file: