\Twig\CacheFilesystemCache

Implements a cache on the filesystem.

Summary

Methods
Properties
Constants
__construct()
generateKey()
load()
write()
getTimestamp()
No public properties found
FORCE_BYTECODE_INVALIDATION
No protected methods found
No protected properties found
N/A
No private methods found
$directory
$options
N/A

Constants

FORCE_BYTECODE_INVALIDATION

FORCE_BYTECODE_INVALIDATION = 1

Properties

$directory

$directory : 

Type

$options

$options : 

Type

Methods

__construct()

__construct(  $directory,   $options) 

Parameters

$directory

string The root cache directory

$options

int A set of options

generateKey()

generateKey(string  $name, string  $className) : string

Generates a cache key for the given template class name.

Parameters

string $name

The template name

string $className

The template class name

Returns

string

load()

load(string  $key) 

Loads a template from the cache.

Parameters

string $key

The cache key

write()

write(string  $key, string  $content) 

Writes the compiled template to cache.

Parameters

string $key

The cache key

string $content

The template representation as a PHP class

getTimestamp()

getTimestamp(string  $key) : integer

Returns the modification timestamp of a key.

Parameters

string $key

The cache key

Returns

integer