Inheritance diagram for FileCache:An optional bare bones PSR-16 "compliant" file-based cache for SimpleCachePool.
Requires
psr/simple-cache(any version).
This is not safe for concurrency.
Don't use this if you have a better cache.
Public Methods | |
| __construct (string $dir) | |
| bool | clear () |
| Does nothing. More... | |
| bool | delete ($key) |
CacheInterface:1|2 compatible params. More... | |
| bool | deleteMultiple ($keys) |
CacheInterface:1|2 compatible params. More... | |
| string object mixed | get ($key, $default=null) |
CacheInterface:1|2 compatible params. More... | |
| array | getMultiple ($keys, $default=null) |
CacheInterface:1|2 compatible params. More... | |
| bool | has ($key) |
CacheInterface:1|2 compatible params. More... | |
| bool | set ($key, $value, $ttl=null) |
CacheInterface:1|2 compatible params. More... | |
| $this | setLog (?LoggerInterface $log) |
| bool | setMultiple ($values, $ttl=null) |
CacheInterface:1|2 compatible params. More... | |
| __construct | ( | string | $dir | ) |
| string | $dir |
| bool clear | ( | ) |
Does nothing.
false | bool delete | ( | $key | ) |
CacheInterface:1|2 compatible params.
| string | $key |
| bool deleteMultiple | ( | $keys | ) |
CacheInterface:1|2 compatible params.
| iterable | $keys |
| string object mixed get | ( | $key, | |
$default = null |
|||
| ) |
CacheInterface:1|2 compatible params.
| string | $key | |
| mixed | $default |
$default is the only mixed type returned | array getMultiple | ( | $keys, | |
$default = null |
|||
| ) |
CacheInterface:1|2 compatible params.
| iterable | $keys | |
| mixed | $default |
| bool has | ( | $key | ) |
CacheInterface:1|2 compatible params.
This only checks for file existence, regardless of expiration. This is fine, since by principle, cache polling does not guarantee a subsequent hit.
| string | $key |
| bool set | ( | $key, | |
| $value, | |||
$ttl = null |
|||
| ) |
CacheInterface:1|2 compatible params.
| string | $key | |
| string | object | $value | |
| null | int | DateInterval | $ttl | NULL is the same as 0 seconds. |
| $this setLog | ( | ?LoggerInterface | $log | ) |
| null | LoggerInterface | $log |
| bool setMultiple | ( | $values, | |
$ttl = null |
|||
| ) |
CacheInterface:1|2 compatible params.
| iterable | $values | |
| int | DateInterval | $ttl | NULL is the same as 0 seconds. |