Twig_Cache_Filesystem
extends FilesystemCache
in package
Implements a cache on the filesystem.
Tags
Table of Contents
- FORCE_BYTECODE_INVALIDATION = 1
- $directory : mixed
- $options : mixed
- __construct() : mixed
- generateKey() : string
- Generates a cache key for the given template class name.
- getTimestamp() : int
- Returns the modification timestamp of a key.
- load() : mixed
- Loads a template from the cache.
- write() : mixed
- Writes the compiled template to cache.
Constants
FORCE_BYTECODE_INVALIDATION
public
mixed
FORCE_BYTECODE_INVALIDATION
= 1
Properties
$directory
private
mixed
$directory
$options
private
mixed
$options
Methods
__construct()
public
__construct(string $directory, int $options) : mixed
Parameters
- $directory : string
-
The root cache directory
- $options : int
-
A set of options
Return values
mixed —generateKey()
Generates a cache key for the given template class name.
public
generateKey(mixed $name, mixed $className) : string
Parameters
- $name : mixed
-
The template name
- $className : mixed
-
The template class name
Return values
string —getTimestamp()
Returns the modification timestamp of a key.
public
getTimestamp(mixed $key) : int
Parameters
- $key : mixed
-
The cache key
Return values
int —load()
Loads a template from the cache.
public
load(mixed $key) : mixed
Parameters
- $key : mixed
-
The cache key
Return values
mixed —write()
Writes the compiled template to cache.
public
write(mixed $key, mixed $content) : mixed
Parameters
- $key : mixed
-
The cache key
- $content : mixed
-
The template representation as a PHP class