CacheAdapterInterface
interface CacheAdapterInterface (View source)
Methods
bool
add(string $key, mixed $data, int|null $time = null)
Add new enter in the cache system
bool
set(string $key, mixed $data, int|null $time = null)
Set a new enter
bool
addMany(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
addTime(string $key, int $time)
Increase the cache expiration time
int|bool|string
timeOf(string $key)
Retrieves the cache expiration time
bool
forget(string $key)
Delete 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
Details
bool
add(string $key, mixed $data, int|null $time = null)
Add new enter in the cache system
bool
set(string $key, mixed $data, int|null $time = null)
Set a new enter
bool
addMany(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
addTime(string $key, int $time)
Increase the cache expiration time
int|bool|string
timeOf(string $key)
Retrieves the cache expiration time
bool
forget(string $key)
Delete 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