TplFilesystemCache
extends FilesystemCache
in package
Extends Twig's filesystem cache implementation with an alternate constructor.
Table of Contents
Methods
- __construct() : mixed
- create() : self
- Creates an instance of the filesystem cacher in the system temporary path based on project name and version.
Methods
__construct()
public
__construct(string $path, bool $autoReload) : mixed
Parameters
- $path : string
-
Directory path to store the cache in.
- $autoReload : bool
-
Whether to refresh the cache if changes are detected.
create()
Creates an instance of the filesystem cacher in the system temporary path based on project name and version.
public
static create(string $name, string|null $version) : self
Parameters
- $name : string
-
Name of the project in a format the filesystem will be happy with.
- $version : string|null
-
Version of the project in a format the filesystem will be happy with or null to enable auto reload.