class PsrCache implements StorageContract

Methods

__construct(CacheInterface $cache)

Constructor.

void
add(string $key, mixed $value, int $minutes)

Add a new item into storage.

void
forever(string $key, mixed $value)

Add a new item into storage forever.

mixed
get(string $key)

Get an item from storage.

bool
destroy(string $key)

Remove an item from storage.

void
flush()

Remove all items associated with the tag.

Details

at line 15
__construct(CacheInterface $cache)

Constructor.

Parameters

CacheInterface $cache

at line 23
void add(string $key, mixed $value, int $minutes)

Add a new item into storage.

Parameters

string $key
mixed $value
int $minutes

Return Value

void

at line 31
void forever(string $key, mixed $value)

Add a new item into storage forever.

Parameters

string $key
mixed $value

Return Value

void

at line 39
mixed get(string $key)

Get an item from storage.

Parameters

string $key

Return Value

mixed

at line 47
bool destroy(string $key)

Remove an item from storage.

Parameters

string $key

Return Value

bool

at line 55
void flush()

Remove all items associated with the tag.

Return Value

void