RawReadable
interface RawReadable
| internal | This capability exists for the cache layer's own sentinel-awareness. App code should use Cache::get() / Cache::many() / Cache::pull() etc., which unwrap sentinels to null. Only implement this on custom stores that wrap other stores by bouncing reads through a Repository — in that case, implementing RawReadable (and routing your internal memoization / failover logic through the inner repository's getRaw() / manyRaw()) is what keeps rememberNullable() performant across your wrapper. Plain stores that store and retrieve values directly (RedisStore, FileStore, DatabaseStore, ArrayStore, SwooleStore, etc.) already return raw stored values from get() / many() and do NOT need to implement this interface — Repository::getRaw() / manyRaw() will fall back to get() / many() on stores that don't implement RawReadable. |
Capability interface for cache layers that expose raw reads (returns the value as it was stored, including the internal NullSentinel::VALUE marker used by the nullable cache methods).
Methods
mixed
getRaw(UnitEnum|string $key)
Retrieve an item from the cache by key without unwrapping sentinels.
array
manyRaw(array $keys)
Retrieve multiple items by key without unwrapping sentinels.
Details
at line 37
mixed
getRaw(UnitEnum|string $key)
Retrieve an item from the cache by key without unwrapping sentinels.
at line 46
array
manyRaw(array $keys)
Retrieve multiple items by key without unwrapping sentinels.