FileCache
in package
implements
CacheInterface
Class FileCache
Interfaces, Classes and Traits
- CacheInterface
Table of Contents
- $cachedData : array<string|int, CachedData>
- $cacheInitializer : CacheInitializerAggregate
- $fileCacheRepository : FileCacheRepository
- $namespace : string
- clear() : bool
- create() : static
- delete() : bool
- deleteMultiple() : bool
- get() : mixed
- getMultiple() : iteratable<string|int, mixed>
- has() : bool
- set() : bool
- setMultiple() : bool
- __construct() : mixed
- FileCache constructor.
- buildCachedDataIfPossible() : bool
- validateKey() : bool
Properties
$cachedData
private
array<string|int, CachedData>
$cachedData
$cacheInitializer
private
CacheInitializerAggregate
$cacheInitializer
$fileCacheRepository
private
FileCacheRepository
$fileCacheRepository
$namespace
private
string
$namespace
Methods
clear()
public
clear() : bool
Tags
Return values
bool —create()
public
static create(FileCacheRepository $fileCacheRepository, CacheInitializerAggregate $cacheInitializer, string $namespace) : static
Parameters
- $fileCacheRepository : FileCacheRepository
- $cacheInitializer : CacheInitializerAggregate
- $namespace : string
Tags
Return values
static —delete()
public
delete(mixed $key) : bool
Parameters
- $key : mixed
Tags
Return values
bool —deleteMultiple()
public
deleteMultiple(mixed $keys) : bool
Parameters
- $keys : mixed
Tags
Return values
bool —get()
public
get(mixed $key[, mixed $default = null ]) : mixed
Parameters
- $key : mixed
- $default : mixed = null
Tags
Return values
mixed —getMultiple()
public
getMultiple(mixed $keys[, mixed $default = null ]) : iteratable<string|int, mixed>
Parameters
- $keys : mixed
- $default : mixed = null
Tags
Return values
iteratable<string|int, mixed> —has()
public
has(mixed $key) : bool
Parameters
- $key : mixed
Tags
Return values
bool —set()
public
set(mixed $key, mixed $value[, mixed $ttl = null ]) : bool
Parameters
- $key : mixed
- $value : mixed
- $ttl : mixed = null
Tags
Return values
bool —setMultiple()
public
setMultiple(mixed $values[, mixed $ttl = null ]) : bool
Parameters
- $values : mixed
- $ttl : mixed = null
Tags
Return values
bool —__construct()
FileCache constructor.
protected
__construct(FileCacheRepository $fileCacheRepository, CacheInitializerAggregate $cacheInitializer, string $namespace) : mixed
Parameters
- $fileCacheRepository : FileCacheRepository
- $cacheInitializer : CacheInitializerAggregate
- $namespace : string
Return values
mixed —buildCachedDataIfPossible()
private
buildCachedDataIfPossible(string $key) : bool
Parameters
- $key : string
Tags
Return values
bool —validateKey()
private
validateKey(string $key) : bool
Parameters
- $key : string