FileCache
class FileCache implements FileCacheInterface (View source)
Allows to cache data based on file modification dates.
Properties
| protected string | $prefix | Prefix that is used for cache entries. |
|
| static protected array | $cached | Static cache that contains already loaded cache entries. |
|
| protected string | $collection | The collection identifier of this cache. |
|
| protected FileCacheBackendInterface | $cache | The cache backend backing this FileCache object. |
Methods
__construct(string $prefix, string $collection, string|null $cache_backend_class = NULL, array $cache_backend_configuration = [])
Constructs a FileCache object.
mixed|null
get(string $filepath)
Gets data based on a filename.
array
getMultiple(array $filepaths)
Gets data based on filenames.
set(string $filepath, mixed $data)
Stores data based on a filename.
delete(string $filepath)
Deletes data from the cache.
static
reset()
Resets the static cache.
Details
__construct(string $prefix, string $collection, string|null $cache_backend_class = NULL, array $cache_backend_configuration = [])
Constructs a FileCache object.
mixed|null
get(string $filepath)
Gets data based on a filename.
array
getMultiple(array $filepaths)
Gets data based on filenames.
set(string $filepath, mixed $data)
Stores data based on a filename.
delete(string $filepath)
Deletes data from the cache.
static
reset()
Resets the static cache.