class NamespacedTaggedCache extends TaggedCache

Tagged cache for namespaced tag semantics.

Item keys are namespaced by the tag set: values must be read, written, and deleted through the same ordered tag set used to store them.

Traits

Constants

FLEXIBLE_CREATED_KEY_PREFIX

The cache key prefix used to track when a flexible cache value was last refreshed.

Properties

static protected array $macros

The registered string macros.

from  Macroable
protected Store $store

The cache store implementation.

from  Repository
protected Dispatcher|null $events

The event dispatcher implementation.

from  Repository
protected int|null $default

The default number of seconds to store items.

from  Repository
protected array $config

The cache store configuration.

from  Repository
static protected Closure|null $unserializableClassHandler

The callback to invoke when an unserializable class is encountered.

from  Repository
protected NamespacedTagSet $tags

The tag set instance.

Methods

int
secondsUntil(DateInterval|DateTimeInterface|int $delay)

Get the number of seconds until the given DateTime.

int
availableAt(DateInterval|DateTimeInterface|int|null $delay = 0)

Get the "available at" UNIX timestamp.

parseDateInterval(DateInterval|DateTimeInterface|int|null $delay)

If the given value is an interval, convert it to a DateTime instance.

int
currentTime()

Get the current system time as a UNIX timestamp.

string
runTimeForHumans(float $startTime, float|null $endTime = null)

Given a start time, format the total run time for human readability.

static void
macro(string $name, callable|object $macro)

Register a custom macro.

static void
mixin(object $mixin, bool $replace = true)

Mix another object into the class.

static bool
hasMacro(string $name)

Check if macro is registered.

static void
flushMacros()

Flush the existing macros.

static mixed
__callStatic(string $method, array $parameters)

Dynamically handle calls to the class.

mixed
__call(string $method, array $parameters)

Dynamically handle calls to the class.

__construct(Store $store, TagSet $tags)

Create a new tagged cache instance.

bool
has(array|UnitEnum|string $key)

Determine if an item exists in the cache.

bool
missing(UnitEnum|string $key)

Determine if an item doesn't exist in the cache.

mixed
get(array|UnitEnum|string $key, mixed $default = null)

Retrieve an item from the cache by key.

array
many(array $keys)

Retrieve multiple items from the cache by key.

iterable
getMultiple(iterable $keys, mixed $default = null)

Retrieve multiple items from the cache by key.

mixed
pull(UnitEnum|string $key, mixed $default = null)

Retrieve an item from the cache and delete it.

string
string(UnitEnum|string $key, callable|string|null $default = null)

Retrieve a string item from the cache.

int
integer(UnitEnum|string $key, callable|int|null $default = null)

Retrieve an integer item from the cache.

float
float(UnitEnum|string $key, callable|float|null $default = null)

Retrieve a float item from the cache.

bool
boolean(UnitEnum|string $key, callable|bool|null $default = null)

Retrieve a boolean item from the cache.

array
array(UnitEnum|string $key, callable|array|null $default = null)

Retrieve an array item from the cache.

bool
put(array|UnitEnum|string $key, mixed $value, DateInterval|DateTimeInterface|int|null $ttl = null)

Store an item in the cache.

bool
set(UnitEnum|string $key, mixed $value, DateInterval|DateTimeInterface|int|null $ttl = null)

Store an item in the cache.

bool
putMany(array $values, DateInterval|DateTimeInterface|int|null $ttl = null)

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

bool
setMultiple(iterable $values, DateInterval|DateTimeInterface|int|null $ttl = null)

No description

bool
add(UnitEnum|string $key, mixed $value, DateInterval|DateTimeInterface|int|null $ttl = null)

Store an item in the cache if the key does not exist.

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

Increment the value of an item in the cache.

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

Decrement the value of an item in the cache.

bool
forever(UnitEnum|string $key, mixed $value)

Store an item in the cache indefinitely.

mixed
remember(UnitEnum|string $key, Closure|DateInterval|DateTimeInterface|int|null $ttl, Closure $callback)

Get an item from the cache, or execute the given Closure and store the result.

array
rememberWithWarmth(UnitEnum|string $key, Closure|DateInterval|DateTimeInterface|int|null $ttl, Closure $callback)

Get an item from the cache, or execute the given Closure and store the result.

mixed
getRawForRemember(UnitEnum|string $key)

Retrieve an item for remember operations without unwrapping sentinels.

mixed
rememberNullable(UnitEnum|string $key, DateInterval|DateTimeInterface|int|null $ttl, Closure $callback)

Get an item from the cache, or execute the given Closure and store the result.

mixed
sear(UnitEnum|string $key, Closure $callback)

Get an item from the cache, or execute the given Closure and store the result forever.

mixed
searNullable(UnitEnum|string $key, Closure $callback)

Get an item from the cache, or execute the given Closure and store the result forever.

mixed
rememberForever(UnitEnum|string $key, Closure $callback)

Get an item from the cache, or execute the given Closure and store the result forever.

mixed
rememberForeverNullable(UnitEnum|string $key, Closure $callback)

Get an item from the cache, or execute the given Closure and store the result forever.

mixed
flexible(UnitEnum|string $key, array $ttl, mixed $callback, array|null $lock = null, bool $alwaysDefer = false)

Retrieve an item from the cache by key, refreshing it in the background if it is stale.

mixed
flexibleNullable(UnitEnum|string $key, array $ttl, mixed $callback, array|null $lock = null, bool $alwaysDefer = false)

Retrieve an item from the cache by key, refreshing it in the background if it is stale.

bool
touch(UnitEnum|string $key, DateInterval|DateTimeInterface|int|null $ttl = null)

Set the expiration of a cached item; null TTL will retain the item forever.

mixed
withoutOverlapping(UnitEnum|string $key, callable $callback, int $lockFor = 0, int $waitFor = 10, string|null $owner = null)

Execute a callback while holding an atomic lock on a cache mutex to prevent overlapping calls.

funnel(UnitEnum|string $name)

Funnel a callback for a maximum number of simultaneous executions.

bool
forget(UnitEnum|string $key)

Remove an item from the cache.

bool
delete(UnitEnum|string $key)

No description

bool
deleteMultiple(iterable $keys)

Delete multiple items from the cache by key.

bool
clear()

Remove all items from the cache.

bool
flushLocks()

Flush all locks from the cache store.

tags(mixed $names)

Begin executing a new tags operation if the store supports it.

bool
supportsTags()

Determine if the current store supports tags.

bool
supportsFlushingLocks()

Determine if the current store supports flushing locks.

int|null
getDefaultCacheTime()

Get the default cache time.

setDefaultCacheTime(int|null $seconds)

Set the default cache time in seconds.

getStore()

Get the cache store implementation.

setStore(Store $store)

Set the cache store implementation.

Dispatcher|null
getEventDispatcher()

Get the event dispatcher instance.

void
setEventDispatcher(Dispatcher $events)

Set the event dispatcher instance.

static void
handleUnserializableClassUsing(callable|null $callback)

Register a callback to be invoked when an unserializable class is encountered.

string|null
getName()

Get the cache store name.

bool
offsetExists(string|UnitEnum $key)

Determine if a cached value exists.

mixed
offsetGet(string|UnitEnum $key)

Retrieve an item from the cache by key.

void
offsetSet(string|UnitEnum $key, mixed $value)

Store an item in the cache for the default time.

void
offsetUnset(string|UnitEnum $key)

Remove an item from the cache.

mixed
handleManyResult(array $keys, string $key, mixed $value)

Handle a result for the "many" method.

bool
putManyForever(array $values)

Store multiple items in the cache indefinitely.

string
itemKey(string $key)

Format the key for a cache item.

mixed
handleIncompleteClass(string $key, mixed $value)

Handle a cache value that contains an incomplete class.

int
getSeconds(DateInterval|DateTimeInterface|int $ttl)

Calculate the number of seconds for the given TTL.

void
event(string $eventClass, Closure $event)

Fire an event for this cache instance.

mixed
getRaw(UnitEnum|string $key)

Retrieve an item from the cache by key without unwrapping sentinels.

array
manyRaw(array $keys)

Retrieve multiple items from the cache by key without unwrapping sentinels.

static void
flushState()

Flush all static state.

__clone()

Clone cache repository instance.

bool
flush()

Remove all items from the cache.

getTags()

Get the tag set instance.

string
taggedItemKey(string $key)

Get a fully qualified key for a tagged item.

Details

in InteractsWithTime at line 17
protected int secondsUntil(DateInterval|DateTimeInterface|int $delay)

Get the number of seconds until the given DateTime.

Parameters

DateInterval|DateTimeInterface|int $delay

Return Value

int

in InteractsWithTime at line 29
protected int availableAt(DateInterval|DateTimeInterface|int|null $delay = 0)

Get the "available at" UNIX timestamp.

Parameters

DateInterval|DateTimeInterface|int|null $delay

Return Value

int

in InteractsWithTime at line 41
protected DateTimeInterface|int parseDateInterval(DateInterval|DateTimeInterface|int|null $delay)

If the given value is an interval, convert it to a DateTime instance.

Parameters

DateInterval|DateTimeInterface|int|null $delay

Return Value

DateTimeInterface|int

in InteractsWithTime at line 57
protected int currentTime()

Get the current system time as a UNIX timestamp.

Return Value

int

in InteractsWithTime at line 65
protected string runTimeForHumans(float $startTime, float|null $endTime = null)

Given a start time, format the total run time for human readability.

Parameters

float $startTime
float|null $endTime

Return Value

string

in Macroable at line 28
static void macro(string $name, callable|object $macro)

Register a custom macro.

Boot-only. Macros persist in a static property for the worker lifetime and apply to every subsequent call on the macroable class.

Parameters

string $name
callable|object $macro

Return Value

void

in Macroable at line 41
static void mixin(object $mixin, bool $replace = true)

Mix another object into the class.

Boot-only. Delegates to macro() for each method; registered macros persist in a static property for the worker lifetime.

Parameters

object $mixin
bool $replace

Return Value

void

Exceptions

ReflectionException

in Macroable at line 57
static bool hasMacro(string $name)

Check if macro is registered.

Parameters

string $name

Return Value

bool

in Macroable at line 68
static void flushMacros()

Flush the existing macros.

Boot or tests only. Clears worker-wide macros; concurrent coroutines may resolve different methods depending on timing.

Return Value

void

in Macroable at line 78
static mixed __callStatic(string $method, array $parameters)

Dynamically handle calls to the class.

Parameters

string $method
array $parameters

Return Value

mixed

Exceptions

BadMethodCallException

in Macroable at line 103
mixed __call(string $method, array $parameters)

Dynamically handle calls to the class.

Parameters

string $method
array $parameters

Return Value

mixed

Exceptions

BadMethodCallException

at line 27
__construct(Store $store, TagSet $tags)

Create a new tagged cache instance.

Parameters

Store $store
TagSet $tags

in Repository at line 100
bool has(array|UnitEnum|string $key)

Determine if an item exists in the cache.

Parameters

array|UnitEnum|string $key

Return Value

bool

in Repository at line 108
bool missing(UnitEnum|string $key)

Determine if an item doesn't exist in the cache.

Parameters

UnitEnum|string $key

Return Value

bool

in Repository at line 122
mixed get(array|UnitEnum|string $key, mixed $default = null)

Retrieve an item from the cache by key.

Parameters

array|UnitEnum|string $key
mixed $default

Return Value

mixed

in Repository at line 138
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

in Repository at line 159
iterable getMultiple(iterable $keys, mixed $default = null)

Retrieve multiple items from the cache by key.

Parameters

iterable $keys
mixed $default

Return Value

iterable

in Repository at line 184
mixed pull(UnitEnum|string $key, mixed $default = null)

Retrieve an item from the cache and delete it.

Parameters

UnitEnum|string $key
mixed $default

Return Value

mixed

in Repository at line 198
string string(UnitEnum|string $key, callable|string|null $default = null)

Retrieve a string item from the cache.

Parameters

UnitEnum|string $key
callable|string|null $default

Return Value

string

Exceptions

InvalidArgumentException

in Repository at line 219
int integer(UnitEnum|string $key, callable|int|null $default = null)

Retrieve an integer item from the cache.

Parameters

UnitEnum|string $key
callable|int|null $default

Return Value

int

Exceptions

InvalidArgumentException

in Repository at line 244
float float(UnitEnum|string $key, callable|float|null $default = null)

Retrieve a float item from the cache.

Parameters

UnitEnum|string $key
callable|float|null $default

Return Value

float

Exceptions

InvalidArgumentException

in Repository at line 269
bool boolean(UnitEnum|string $key, callable|bool|null $default = null)

Retrieve a boolean item from the cache.

Parameters

UnitEnum|string $key
callable|bool|null $default

Return Value

bool

Exceptions

InvalidArgumentException

in Repository at line 292
array array(UnitEnum|string $key, callable|array|null $default = null)

Retrieve an array item from the cache.

Parameters

UnitEnum|string $key
callable|array|null $default

Return Value

array

Exceptions

InvalidArgumentException

in Repository at line 309
bool put(array|UnitEnum|string $key, mixed $value, DateInterval|DateTimeInterface|int|null $ttl = null)

Store an item in the cache.

Parameters

array|UnitEnum|string $key
mixed $value
DateInterval|DateTimeInterface|int|null $ttl

Return Value

bool

in Repository at line 351
bool set(UnitEnum|string $key, mixed $value, DateInterval|DateTimeInterface|int|null $ttl = null)

Store an item in the cache.

Parameters

UnitEnum|string $key
mixed $value
DateInterval|DateTimeInterface|int|null $ttl

Return Value

bool

in TaggedCache at line 37
bool putMany(array $values, DateInterval|DateTimeInterface|int|null $ttl = null)

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

Parameters

array $values
DateInterval|DateTimeInterface|int|null $ttl

Return Value

bool

in Repository at line 400
bool setMultiple(iterable $values, DateInterval|DateTimeInterface|int|null $ttl = null)

No description

Parameters

iterable $values
DateInterval|DateTimeInterface|int|null $ttl

Return Value

bool

in Repository at line 408
bool add(UnitEnum|string $key, mixed $value, DateInterval|DateTimeInterface|int|null $ttl = null)

Store an item in the cache if the key does not exist.

Parameters

UnitEnum|string $key
mixed $value
DateInterval|DateTimeInterface|int|null $ttl

Return Value

bool

in TaggedCache at line 55
bool|int increment(UnitEnum|string $key, int $value = 1)

Increment the value of an item in the cache.

Parameters

UnitEnum|string $key
int $value

Return Value

bool|int

in TaggedCache at line 65
bool|int decrement(UnitEnum|string $key, int $value = 1)

Decrement the value of an item in the cache.

Parameters

UnitEnum|string $key
int $value

Return Value

bool|int

in Repository at line 466
bool forever(UnitEnum|string $key, mixed $value)

Store an item in the cache indefinitely.

Parameters

UnitEnum|string $key
mixed $value

Return Value

bool

in Repository at line 495
mixed remember(UnitEnum|string $key, Closure|DateInterval|DateTimeInterface|int|null $ttl, Closure $callback)

Get an item from the cache, or execute the given Closure and store the result.

Parameters

UnitEnum|string $key
Closure|DateInterval|DateTimeInterface|int|null $ttl
Closure $callback

Return Value

mixed

in Repository at line 512
array rememberWithWarmth(UnitEnum|string $key, Closure|DateInterval|DateTimeInterface|int|null $ttl, Closure $callback)

Get an item from the cache, or execute the given Closure and store the result.

Parameters

UnitEnum|string $key
Closure|DateInterval|DateTimeInterface|int|null $ttl
Closure $callback

Return Value

array

the cached value and whether it was warm

in Repository at line 535
protected mixed getRawForRemember(UnitEnum|string $key)

Retrieve an item for remember operations without unwrapping sentinels.

Parameters

UnitEnum|string $key

Return Value

mixed

in Repository at line 554
mixed rememberNullable(UnitEnum|string $key, DateInterval|DateTimeInterface|int|null $ttl, Closure $callback)

Get an item from the cache, or execute the given Closure and store the result.

Unlike remember(), a null return from $callback is stored (as the internal NullSentinel::VALUE marker) and returned as null on subsequent calls rather than triggering re-execution. Public accessors (get, many, pull, has, etc.) unwrap the sentinel automatically — callers never see it.

Parameters

UnitEnum|string $key
DateInterval|DateTimeInterface|int|null $ttl
Closure $callback

Return Value

mixed

in Repository at line 568
mixed sear(UnitEnum|string $key, Closure $callback)

Get an item from the cache, or execute the given Closure and store the result forever.

Parameters

UnitEnum|string $key
Closure $callback

Return Value

mixed

in Repository at line 584
mixed searNullable(UnitEnum|string $key, Closure $callback)

Get an item from the cache, or execute the given Closure and store the result forever.

Alias for rememberForeverNullable().

Parameters

UnitEnum|string $key
Closure $callback

Return Value

mixed

in Repository at line 598
mixed rememberForever(UnitEnum|string $key, Closure $callback)

Get an item from the cache, or execute the given Closure and store the result forever.

Parameters

UnitEnum|string $key
Closure $callback

Return Value

mixed

in Repository at line 625
mixed rememberForeverNullable(UnitEnum|string $key, Closure $callback)

Get an item from the cache, or execute the given Closure and store the result forever.

Unlike rememberForever(), a null return from $callback is stored (as the internal NullSentinel::VALUE marker) and returned as null on subsequent calls rather than triggering re-execution. Public accessors unwrap the sentinel automatically.

Parameters

UnitEnum|string $key
Closure $callback

Return Value

mixed

in Repository at line 640
mixed flexible(UnitEnum|string $key, array $ttl, mixed $callback, array|null $lock = null, bool $alwaysDefer = false)

Retrieve an item from the cache by key, refreshing it in the background if it is stale.

Parameters

UnitEnum|string $key
array $ttl
mixed $callback
array|null $lock
bool $alwaysDefer

Return Value

mixed

in Repository at line 707
mixed flexibleNullable(UnitEnum|string $key, array $ttl, mixed $callback, array|null $lock = null, bool $alwaysDefer = false)

Retrieve an item from the cache by key, refreshing it in the background if it is stale.

Unlike flexible(), a null return from $callback is stored (as the internal NullSentinel::VALUE marker) and returned as null on subsequent calls rather than triggering re-execution. Public accessors unwrap the sentinel automatically.

Inherits flexible()'s support matrix: unsupported on any-mode tagged caches (tags()->flexibleNullable() on a TagMode::Any store throws the same BadMethodCallException that tags()->flexible() does, because flexible() internally reads via manyRaw() (initial batched read) and getRaw() (refresh closure), both of which AnyTaggedCache overrides to throw in any-mode).

Parameters

UnitEnum|string $key
array $ttl
mixed $callback
array|null $lock
bool $alwaysDefer

Return Value

mixed

in Repository at line 715
bool touch(UnitEnum|string $key, DateInterval|DateTimeInterface|int|null $ttl = null)

Set the expiration of a cached item; null TTL will retain the item forever.

Parameters

UnitEnum|string $key
DateInterval|DateTimeInterface|int|null $ttl

Return Value

bool

in Repository at line 739
mixed withoutOverlapping(UnitEnum|string $key, callable $callback, int $lockFor = 0, int $waitFor = 10, string|null $owner = null)

Execute a callback while holding an atomic lock on a cache mutex to prevent overlapping calls.

Parameters

UnitEnum|string $key
callable $callback
int $lockFor
int $waitFor
string|null $owner

Return Value

mixed

Exceptions

LockTimeoutException

in Repository at line 749
ConcurrencyLimiterBuilder funnel(UnitEnum|string $name)

Funnel a callback for a maximum number of simultaneous executions.

Parameters

UnitEnum|string $name

Return Value

ConcurrencyLimiterBuilder

in Repository at line 763
bool forget(UnitEnum|string $key)

Remove an item from the cache.

Parameters

UnitEnum|string $key

Return Value

bool

in Repository at line 781
bool delete(UnitEnum|string $key)

No description

Parameters

UnitEnum|string $key

Return Value

bool

in Repository at line 791
bool deleteMultiple(iterable $keys)

Delete multiple items from the cache by key.

Parameters

iterable $keys

Return Value

bool

in TaggedCache at line 91
bool clear()

Remove all items from the cache.

A tagged cache's PSR clear() scope is the tag set, not the whole store.

Return Value

bool

in Repository at line 827
bool flushLocks()

Flush all locks from the cache store.

Return Value

bool

Exceptions

BadMethodCallException

in Repository at line 860
TaggedCache tags(mixed $names)

Begin executing a new tags operation if the store supports it.

Parameters

mixed $names

Return Value

TaggedCache

Exceptions

BadMethodCallException
NotSupportedException

in Repository at line 888
bool supportsTags()

Determine if the current store supports tags.

Return Value

bool

in Repository at line 896
bool supportsFlushingLocks()

Determine if the current store supports flushing locks.

Return Value

bool

in Repository at line 904
int|null getDefaultCacheTime()

Get the default cache time.

Return Value

int|null

in Repository at line 916
Repository setDefaultCacheTime(int|null $seconds)

Set the default cache time in seconds.

Boot-only. Persists on the cached repository for the worker lifetime and applies to every subsequent write that falls back to the default TTL; per-request use races across coroutines.

Parameters

int|null $seconds

Return Value

Repository

in Repository at line 926
Store getStore()

Get the cache store implementation.

Return Value

Store

in Repository at line 938
Repository setStore(Store $store)

Set the cache store implementation.

Boot-only. Replaces the backing store on the cached repository for the worker lifetime; per-request use races and every concurrent read/write through this repository would hit the wrong store.

Parameters

Store $store

Return Value

Repository

in Repository at line 948
Dispatcher|null getEventDispatcher()

Get the event dispatcher instance.

Return Value

Dispatcher|null

in Repository at line 960
void setEventDispatcher(Dispatcher $events)

Set the event dispatcher instance.

Boot or tests only. Persists on the cached repository for the worker lifetime; per-request use races across coroutines. Reached by CacheManager::refreshEventDispatcher() from Event::fake() / fakeFor().

Parameters

Dispatcher $events

Return Value

void

in Repository at line 971
static void handleUnserializableClassUsing(callable|null $callback)

Register a callback to be invoked when an unserializable class is encountered.

Boot or tests only. The callback persists for the worker lifetime and affects every subsequent cache read.

Parameters

callable|null $callback

Return Value

void

in Repository at line 981
string|null getName()

Get the cache store name.

Return Value

string|null

in Repository at line 991
bool offsetExists(string|UnitEnum $key)

Determine if a cached value exists.

Parameters

string|UnitEnum $key

Return Value

bool

in Repository at line 1001
mixed offsetGet(string|UnitEnum $key)

Retrieve an item from the cache by key.

Parameters

string|UnitEnum $key

Return Value

mixed

in Repository at line 1012
void offsetSet(string|UnitEnum $key, mixed $value)

Store an item in the cache for the default time.

Parameters

string|UnitEnum $key
mixed $value

Return Value

void

in Repository at line 1022
void offsetUnset(string|UnitEnum $key)

Remove an item from the cache.

Parameters

string|UnitEnum $key

Return Value

void

in Repository at line 1030
protected mixed handleManyResult(array $keys, string $key, mixed $value)

Handle a result for the "many" method.

Parameters

array $keys
string $key
mixed $value

Return Value

mixed

in Repository at line 1045
protected bool putManyForever(array $values)

Store multiple items in the cache indefinitely.

Parameters

array $values

Return Value

bool

at line 51
protected string itemKey(string $key)

Format the key for a cache item.

Parameters

string $key

Return Value

string

in Repository at line 1069
protected mixed handleIncompleteClass(string $key, mixed $value)

Handle a cache value that contains an incomplete class.

Parameters

string $key
mixed $value

Return Value

mixed

in Repository at line 1087
protected int getSeconds(DateInterval|DateTimeInterface|int $ttl)

Calculate the number of seconds for the given TTL.

Parameters

DateInterval|DateTimeInterface|int $ttl

Return Value

int

in TaggedCache at line 107
protected void event(string $eventClass, Closure $event)

Fire an event for this cache instance.

Parameters

string $eventClass
Closure $event

Return Value

void

in Repository at line 1129
mixed getRaw(UnitEnum|string $key)

internal  For cache-layer internal use (sentinel-aware hit detection in remember/rememberForever/flexible, plus the RawReadable seam that wrapper stores like MemoizedStore / FailoverStore use). App code should use get(), which unwraps NullSentinel::VALUE to null. Fires the same RetrievingKey / CacheHit / CacheMissed events as get(), so observability is unchanged — cached-null entries still fire CacheHit, but the event payload is unwrapped to null to match the public API. Delegates to $this->store->getRaw() when the underlying store implements RawReadable (wrapper stores that need to preserve sentinels across their own internal indirection). Otherwise calls $this->store->get(), which plain stores already implement as a raw read.
 

Retrieve an item from the cache by key without unwrapping sentinels.

Parameters

UnitEnum|string $key

Return Value

mixed

the raw stored value — may be null (genuine miss), Hypervel\Cache\NullSentinel::VALUE (cached-null via the nullable cache methods), or a real cached value

in Repository at line 1182
array manyRaw(array $keys)

internal  For cache-layer internal use. App code should use many(), which unwraps sentinels via handleManyResult(). Batched raw-read counterpart to getRaw(). Used by flexible() to preserve its single batched store read (avoiding a hot-path regression from splitting into sequential get() calls), while still returning raw sentinels so the caller can distinguish "cached sentinel = hit" from "genuinely absent = miss". Applies itemKey() to each key so tag-namespacing works correctly on TaggedCache / AllTaggedCache (which prepend hash('xxh128', $tagNamespace) . ':'). AnyTaggedCache overrides this method to throw, preserving the any-mode invariant that reads through tags are rejected. Fires RetrievingManyKeys + per-key CacheHit/CacheMissed events, matching the event shape of public many() calls. Delegates to $this->store->manyRaw() when the underlying store implements RawReadable (MemoizedStore / FailoverStore). Otherwise calls $this->store->many(), which plain stores already implement as a raw read.
 

Retrieve multiple items from the cache by key without unwrapping sentinels.

Parameters

array $keys

Return Value

array

keyed by the input keys; values are raw (may include null, NullSentinel::VALUE, or real values)

in Repository at line 1224
static void flushState()

Flush all static state.

Return Value

void

in Repository at line 1245
__clone()

Clone cache repository instance.

in TaggedCache at line 75
bool flush()

Remove all items from the cache.

Return Value

bool

at line 43
TagSet getTags()

Get the tag set instance.

Return Value

TagSet

at line 35
string taggedItemKey(string $key)

Get a fully qualified key for a tagged item.

Parameters

string $key

Return Value

string