class TaggedCache implements StorageContract

Constants

private DIRECT_KEY_PREFIX

Key prefix applied in direct-key storage.

In all mode the tag namespace isolates blacklist keys from the rest of the cache; in any mode keys are plain, so the prefix provides that isolation instead.

Properties

protected string $tag
protected bool $directKeyMode

Whether the store uses direct plain-key reads.

Methods

__construct(Repository $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.

string
storageKey(string $key)

Get the storage key for a logical blacklist key.

Details

at line 36
__construct(Repository $cache)

Constructor.

Parameters

Repository $cache

at line 49
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 58
void forever(string $key, mixed $value)

Add a new item into storage forever.

Parameters

string $key
mixed $value

Return Value

void

at line 67
mixed get(string $key)

Get an item from storage.

Parameters

string $key

Return Value

mixed

at line 80
bool destroy(string $key)

Remove an item from storage.

Parameters

string $key

Return Value

bool

at line 93
void flush()

Remove all items associated with the tag.

Return Value

void

at line 102
protected string storageKey(string $key)

Get the storage key for a logical blacklist key.

Parameters

string $key

Return Value

string