CacheAdapterInterface
interface CacheAdapterInterface (View source)
Methods
Set a new enter
Add many item
Adds a cache that will persist
Add new enter in the cache system
Retrieve an entry in the cache
Increase the cache expiration time
Retrieves the cache expiration time
Remove an entry from the cache
Retrieve an entry from the cache or store it if it does not exist
Increment the value of an entry in the cache
Decrement the value of an entry in the cache
Check for an entry in the cache.
Check if the cache has expired
Clear all cache
Details
bool
set(string $key, mixed $data, int|null $time = null)
Set a new enter
bool
setMany(array $data)
Add many item
bool
forever(string $key, mixed $data)
Adds a cache that will persist
bool
push(string $key, array $data)
Add new enter in the cache system
mixed
get(string $key, mixed $default = null)
Retrieve an entry in the cache
bool
setTime(string $key, int $time)
Increase the cache expiration time
int|bool|string
timeOf(string $key)
Retrieves the cache expiration time
bool
forget(string $key)
Remove an entry from the cache
mixed
remember(string $key, int $time, callable $callback)
Retrieve an entry from the cache or store it if it does not exist
int
increment(string $key, int $value = 1)
Increment the value of an entry in the cache
int
decrement(string $key, int $value = 1)
Decrement the value of an entry in the cache
bool
has(string $key)
Check for an entry in the cache.
bool
expired(string $key)
Check if the cache has expired
void
clear()
Clear all cache