TwigCache
extends FilesystemCache
in package
This is the TwigCache class.
This class extends \Twig\Cache\FilesystemCache, see this class.
Tags
Table of Contents
__construct() | Constructor. Creates the Twig cache and initializes the cache directory with the specified in the $site parameter. | : mixed |
---|---|---|
generateKey() | This method overrides FileSystemCache::generateKey() to return a key based not only in the class name but also in the site path and the provided name. | : mixed |
Methods
__construct()
Constructor. Creates the Twig cache and initializes the cache directory with the specified in the $site parameter.
public
__construct([string $site = SITE_PATH ]) : mixed
Parameters
- $site : string = SITE_PATH
-
Path for the cache directory.
Return values
mixed —generateKey()
This method overrides FileSystemCache::generateKey() to return a key based not only in the class name but also in the site path and the provided name.
public
generateKey(mixed $name, mixed $class) : mixed
Parameters
- $name : mixed
- $class : mixed