StackStore
class StackStore extends TaggableStore implements AuthoritativeRawReadable, CanFlushLocks, LockProvider
Properties
| protected StackStoreProxy> | $stores | The ordered store layers. |
|
| protected false|string|null | $tagCompositionError | Memoized tag-composition validation error. |
Methods
Begin executing a new tags operation.
Determine if this store currently supports tags.
Get the tag mode this store operates under.
No description
Retrieve an item from the cache by key.
Retrieve an item from the authoritative bottom layer without backfilling upper layers.
Retrieve multiple items from the cache by key.
Store an item in the cache for a given number of seconds.
Store multiple items in the cache for a given number of seconds.
Increment the value of an item in the cache.
Decrement the value of an item in the cache.
Store an item in the cache indefinitely.
Adjust the expiration time of a cached item.
Remove an item from the cache.
Remove all items from the cache.
Restore a lock instance using the owner identifier.
Determine if the store can currently flush locks.
Flush all locks managed by the store.
Determine if the lock store is separate from the cache store.
Get the cache key prefix.
Get the underlying taggable layer stores, top to bottom.
No description
No description
Store a record in all layers, indexing it under the given tags in the taggable layers.
Store a record in a single layer via the layer's tagged write path when possible.
Increment a record's value, indexing the write under the given tags.
Ensure the layer composition can support stack tags.
No description
Validate the layer composition for tag support.
Get the bottom layer's underlying store.
Get the bottom layer's store as a lock provider.
Details
at line 233
TaggedCache
tags(mixed $names)
Begin executing a new tags operation.
at line 243
bool
supportsTags()
Determine if this store currently supports tags.
at line 253
TagMode
getTagMode()
Get the tag mode this store operates under.
at line 45
__construct(array $stores)
No description
at line 57
mixed
get(string $key)
Retrieve an item from the cache by key.
at line 67
mixed
getAuthoritativeRaw(UnitEnum|string $key)
Retrieve an item from the authoritative bottom layer without backfilling upper layers.
at line 81
array
many(array $keys)
Retrieve multiple items from the cache by key.
Items not found in the cache will have a null value.
at line 86
bool
put(string $key, mixed $value, int $seconds)
Store an item in the cache for a given number of seconds.
at line 96
bool
putMany(array $values, int $seconds)
Store multiple items in the cache for a given number of seconds.
at line 107
bool|int
increment(string $key, int $value = 1)
Increment the value of an item in the cache.
at line 125
bool|int
decrement(string $key, int $value = 1)
Decrement the value of an item in the cache.
at line 130
bool
forever(string $key, mixed $value)
Store an item in the cache indefinitely.
at line 143
bool
touch(string $key, int $seconds)
Adjust the expiration time of a cached item.
at line 157
bool
forget(string $key)
Remove an item from the cache.
at line 162
bool
flush()
Remove all items from the cache.
at line 174
Lock
lock(string $name, int $seconds = 0, string|null $owner = null)
Get a lock instance.
Locks are delegated to the bottom layer and never touch the cache tiers.
at line 184
Lock
restoreLock(string $name, string $owner)
Restore a lock instance using the owner identifier.
at line 192
bool
supportsFlushingLocks()
Determine if the store can currently flush locks.
at line 204
bool
flushLocks()
Flush all locks managed by the store.
at line 221
bool
hasSeparateLockStore()
Determine if the lock store is separate from the cache store.
at line 260
string
getPrefix()
Get the cache key prefix.
at line 272
array
taggableLayers()
Get the underlying taggable layer stores, top to bottom.
at line 289
protected array|null
getOrRestoreRecord(string $key)
No description
at line 309
protected bool
putRecord(string $key, array $record)
No description
at line 322
bool
putRecordTagged(array $tags, string $key, array $record)
Store a record in all layers, indexing it under the given tags in the taggable layers.
at line 330
protected bool
putToStore(StackStoreProxy $store, string $key, array $record)
No description
at line 356
protected bool
putToStoreTagged(StackStoreProxy $proxy, array $tags, string $key, array $record)
Store a record in a single layer via the layer's tagged write path when possible.
Tagged writes bypass StackStoreProxy, so this mirrors putToStore()'s TTL clamp.
at line 393
bool|int
incrementTagged(array $tags, string $key, int $value = 1)
Increment a record's value, indexing the write under the given tags.
at line 416
protected void
ensureTagCompositionIsValid()
Ensure the layer composition can support stack tags.
at line 423
protected string|null
tagCompositionError()
No description
at line 438
protected string|null
validateTagComposition()
Validate the layer composition for tag support.
A non-taggable or all-mode layer below the taggable region would resurrect flushed values on read-through, silently undoing invalidation.
at line 480
protected Store
bottomStore()
Get the bottom layer's underlying store.
at line 490
protected LockProvider
bottomLockProvider()
Get the bottom layer's store as a lock provider.
at line 504
protected mixed
callStoresStacked(Closure $handler, Closure $bottomLayer)
No description
at line 513
protected bool
callStores(Closure $handler, Closure|null $rollback = null)
No description
at line 569
protected bool
callAllStores(Closure $handler)
Call the handler for every store.