class InMemoryDriver implements DriverInterface

Class InMemoryDriver

Properties

protected array $elements

Methods

__construct()

InMemoryDriver constructor.

mixed
fetch(string $id)

No description

bool
contains(int $id)

No description

bool
save(string $id, mixed $data, int $lifeTime = 0)

No description

bool
delete(string $id)

Deletes a cache entry.

Details

at line 19
__construct()

InMemoryDriver constructor.

at line 27
mixed fetch(string $id)

Parameters

string $id

Return Value

mixed

at line 39
bool contains(int $id)

Parameters

int $id

Return Value

bool

at line 47
bool save(string $id, mixed $data, int $lifeTime = 0)

Parameters

string $id
mixed $data
int $lifeTime

Return Value

bool True if saved, false otherwise

at line 57
bool delete(string $id)

Deletes a cache entry.

Parameters

string $id The cache id.

Return Value

bool TRUE if the cache entry was successfully deleted, FALSE otherwise.