interface CacheInterface

Interface for a cache backend.

Methods

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 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 37
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 45
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 52
remove(string $key)

Removes a value from the cache.

Parameters

string $key

A unique key