class NullStore extends TaggableStore implements CanFlushLocks, LockProvider

Traits

Fallback implementations for stores without native multi-key operations.

Methods

tags(mixed $names)

Begin executing a new tags operation.

bool
supportsTags()

Determine if this store currently supports tags.

TagMode
getTagMode()

Get the tag mode this store operates under.

array
many(array $keys)

Retrieve multiple items from the cache by key.

bool
putMany(array $values, int $seconds)

Store multiple items in the cache for a given number of seconds.

mixed
get(string $key)

Retrieve an item from the cache by key.

bool
put(string $key, mixed $value, int $seconds)

Store an item in the cache for a given number of seconds.

bool|int
increment(string $key, int $value = 1)

Increment the value of an item in the cache.

bool|int
decrement(string $key, int $value = 1)

Decrement the value of an item in the cache.

bool
forever(string $key, mixed $value)

Store an item in the cache indefinitely.

lock(string $name, int $seconds = 0, string|null $owner = null)

Get a lock instance.

restoreLock(string $name, string $owner)

Restore a lock instance using the owner identifier.

bool
supportsFlushingLocks()

Determine if the store can currently flush locks.

bool
flushLocks()

Flush all locks managed by the store.

bool
hasSeparateLockStore()

Determine if the lock store is separate from the cache store.

bool
touch(string $key, int $seconds)

Adjust the expiration time of a cached item.

bool
forget(string $key)

Remove an item from the cache.

bool
flush()

Remove all items from the cache.

string
getPrefix()

Get the cache key prefix.

Details

in TaggableStore at line 17
TaggedCache tags(mixed $names)

Begin executing a new tags operation.

Parameters

mixed $names

Return Value

TaggedCache

Exceptions

NotSupportedException

in TaggableStore at line 31
bool supportsTags()

Determine if this store currently supports tags.

Stores whose tag support depends on configuration or composition override this; for everything else extending TaggableStore, tag support is unconditional. A store that can return false here must also throw a NotSupportedException from tags() because Repository relies on the store to enforce its own conditional support.

Return Value

bool

in TaggableStore at line 42
TagMode getTagMode()

Get the tag mode this store operates under.

Default matches TaggableStore::tags() semantics (all-mode: keys are namespaced by the tag set). Subclasses override if they deviate.

Return Value

TagMode

array many(array $keys)

Retrieve multiple items from the cache by key.

Items not found in the cache will have a null value.

Parameters

array $keys

Return Value

array

bool putMany(array $values, int $seconds)

Store multiple items in the cache for a given number of seconds.

Parameters

array $values
int $seconds

Return Value

bool

at line 17
mixed get(string $key)

Retrieve an item from the cache by key.

Parameters

string $key

Return Value

mixed

at line 25
bool put(string $key, mixed $value, int $seconds)

Store an item in the cache for a given number of seconds.

Parameters

string $key
mixed $value
int $seconds

Return Value

bool

at line 33
bool|int increment(string $key, int $value = 1)

Increment the value of an item in the cache.

Parameters

string $key
int $value

Return Value

bool|int

at line 41
bool|int decrement(string $key, int $value = 1)

Decrement the value of an item in the cache.

Parameters

string $key
int $value

Return Value

bool|int

at line 49
bool forever(string $key, mixed $value)

Store an item in the cache indefinitely.

Parameters

string $key
mixed $value

Return Value

bool

at line 57
Lock lock(string $name, int $seconds = 0, string|null $owner = null)

Get a lock instance.

Parameters

string $name
int $seconds
string|null $owner

Return Value

Lock

at line 65
Lock restoreLock(string $name, string $owner)

Restore a lock instance using the owner identifier.

Parameters

string $name
string $owner

Return Value

Lock

at line 73
bool supportsFlushingLocks()

Determine if the store can currently flush locks.

Return Value

bool

at line 81
bool flushLocks()

Flush all locks managed by the store.

Return Value

bool

at line 89
bool hasSeparateLockStore()

Determine if the lock store is separate from the cache store.

Return Value

bool

at line 97
bool touch(string $key, int $seconds)

Adjust the expiration time of a cached item.

Parameters

string $key
int $seconds

Return Value

bool

at line 105
bool forget(string $key)

Remove an item from the cache.

Parameters

string $key

Return Value

bool

at line 113
bool flush()

Remove all items from the cache.

Return Value

bool

at line 121
string getPrefix()

Get the cache key prefix.

Return Value

string