class FilesystemCache implements CacheInterface

A simple filesystem cache.

Properties

private $dir

Methods

__construct($dir)

No description

bool
has(string $key)

Checks if the cache has a value for a key.

string|null
get(string $key)

Returns the value for a key.

set(string $key, string $value)

Sets a value in the cache.

remove(string $key)

Removes a value from the cache.

Details

at line 23
__construct($dir)

No description

Parameters

$dir

at line 28
bool has(string $key)

Checks if the cache has a value for a key.

Parameters

string $key

A unique key

Return Value

bool

Whether the cache has a value for this key

at line 33
string|null get(string $key)

Returns the value for a key.

Parameters

string $key

A unique key

Return Value

string|null

The value in the cache

at line 44
set(string $key, string $value)

Sets a value in the cache.

Parameters

string $key

A unique key

string $value

The value to cache

at line 57
remove(string $key)

Removes a value from the cache.

Parameters

string $key

A unique key