Repository
interface Repository implements CacheInterface
Methods
Retrieve an item from the cache and delete it.
Store an item in the cache.
Store an item in the cache if the key does not exist.
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.
Get an item from the cache, or execute the given Closure and store the result.
Get an item from the cache, or execute the given Closure and store the result.
Get an item from the cache, or execute the given Closure and store the result forever.
Get an item from the cache, or execute the given Closure and store the result.
Get an item from the cache, or execute the given Closure and store the result forever.
Get an item from the cache, or execute the given Closure and store the result forever.
Set the expiration of a cached item; null TTL will retain the item forever.
Remove an item from the cache.
Details
at line 23
mixed
pull(UnitEnum|string $key, mixed $default = null)
Retrieve an item from the cache and delete it.
at line 28
bool
put(array|UnitEnum|string $key, mixed $value, DateInterval|DateTimeInterface|int|null $ttl = null)
Store an item in the cache.
at line 33
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.
at line 38
bool|int
increment(UnitEnum|string $key, int $value = 1)
Increment the value of an item in the cache.
at line 43
bool|int
decrement(UnitEnum|string $key, int $value = 1)
Decrement the value of an item in the cache.
at line 48
bool
forever(UnitEnum|string $key, mixed $value)
Store an item in the cache indefinitely.
at line 58
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.
at line 72
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.
at line 86
mixed
sear(UnitEnum|string $key, Closure $callback)
Get an item from the cache, or execute the given Closure and store the result forever.
at line 96
mixed
rememberForever(UnitEnum|string $key, Closure $callback)
Get an item from the cache, or execute the given Closure and store the result forever.
at line 109
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 and returned on subsequent calls rather than triggering re-execution.
at line 122
mixed
searNullable(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 and returned on subsequent calls rather than triggering re-execution.
at line 135
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 and returned on subsequent calls rather than triggering re-execution.
at line 140
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.
at line 145
bool
forget(UnitEnum|string $key)
Remove an item from the cache.
at line 150
Store
getStore()
Get the cache store implementation.