Cache
in package
Reads/writes to a filesystem cache
Tags
Table of Contents
- $allowList : mixed
- $cacheCollected : mixed
- $enabled : mixed
- $filesystem : mixed
- $io : mixed
- $root : mixed
- __construct() : mixed
- clear() : mixed
- copyFrom() : mixed
- Copy a file into the cache
- copyTo() : mixed
- Copy a file out of the cache
- gc() : mixed
- gcIsNecessary() : mixed
- getRoot() : mixed
- isEnabled() : mixed
- isUsable() : mixed
- read() : mixed
- remove() : mixed
- sha1() : mixed
- sha256() : mixed
- write() : mixed
- getFinder() : mixed
Properties
$allowList
private
mixed
$allowList
$cacheCollected
private
static mixed
$cacheCollected
= false
$enabled
private
mixed
$enabled
= true
$filesystem
private
mixed
$filesystem
$io
private
mixed
$io
$root
private
mixed
$root
Methods
__construct()
public
__construct(IOInterface $io, string $cacheDir[, string $allowList = 'a-z0-9.' ][, Filesystem $filesystem = null ]) : mixed
Parameters
- $io : IOInterface
- $cacheDir : string
-
location of the cache
- $allowList : string = 'a-z0-9.'
-
List of characters that are allowed in path names (used in a regex character class)
- $filesystem : Filesystem = null
-
optional filesystem instance
Return values
mixed —clear()
public
clear() : mixed
Return values
mixed —copyFrom()
Copy a file into the cache
public
copyFrom(mixed $file, mixed $source) : mixed
Parameters
- $file : mixed
- $source : mixed
Return values
mixed —copyTo()
Copy a file out of the cache
public
copyTo(mixed $file, mixed $target) : mixed
Parameters
- $file : mixed
- $target : mixed
Return values
mixed —gc()
public
gc(mixed $ttl, mixed $maxSize) : mixed
Parameters
- $ttl : mixed
- $maxSize : mixed
Return values
mixed —gcIsNecessary()
public
gcIsNecessary() : mixed
Return values
mixed —getRoot()
public
getRoot() : mixed
Return values
mixed —isEnabled()
public
isEnabled() : mixed
Return values
mixed —isUsable()
public
static isUsable(mixed $path) : mixed
Parameters
- $path : mixed
Return values
mixed —read()
public
read(mixed $file) : mixed
Parameters
- $file : mixed
Return values
mixed —remove()
public
remove(mixed $file) : mixed
Parameters
- $file : mixed
Return values
mixed —sha1()
public
sha1(mixed $file) : mixed
Parameters
- $file : mixed
Return values
mixed —sha256()
public
sha256(mixed $file) : mixed
Parameters
- $file : mixed
Return values
mixed —write()
public
write(mixed $file, mixed $contents) : mixed
Parameters
- $file : mixed
- $contents : mixed
Return values
mixed —getFinder()
protected
getFinder() : mixed