StoreInterface
interface StoreInterface
Store interface.
Methods
bool
put(string $key, mixed $data, int $ttl = 0)
Store data in the cache.
bool
putIfNotExists(string $key, mixed $data, int $ttl = 0)
Store data in the cache if it doesn't already exist.
bool
has(string $key)
Returns TRUE if the cache key exists and FALSE if not.
mixed
get(string $key)
Fetch data from the cache.
mixed
getOrElse(string $key, callable $callable, int $ttl = 0)
Fetch data from the cache or store it if it doesn't already exist.
bool
remove(string $key)
Delete data from the cache.
bool
clear()
Clears the cache.
Details
at line 25
bool
put(string $key, mixed $data, int $ttl = 0)
Store data in the cache.
at line 35
bool
putIfNotExists(string $key, mixed $data, int $ttl = 0)
Store data in the cache if it doesn't already exist.
at line 43
bool
has(string $key)
Returns TRUE if the cache key exists and FALSE if not.
at line 51
mixed
get(string $key)
Fetch data from the cache.
at line 61
mixed
getOrElse(string $key, callable $callable, int $ttl = 0)
Fetch data from the cache or store it if it doesn't already exist.
at line 69
bool
remove(string $key)
Delete data from the cache.
at line 76
bool
clear()
Clears the cache.