Abstract class for storage engine for caching
Methods | ||||||||
---|---|---|---|---|---|---|---|---|
public
|
init(array $settings = []): boolean
Iitialize the cache engine
Iitialize the cache engine Called automatically by the cache frontend Parameters
ReturnsTrue if the engine has been successfully initialized, false if not Overriden by |
# | ||||||
public
|
gc()
Garbage collection
Garbage collection Permanently remove all expired and deleted data Overriden by |
# | ||||||
public
|
write(string $key, mixed $value, mixed $duration = null): boolean
Write value for a key into cache
Write value for a key into cache Parameters
ReturnsTrue if the data was successfully cached, false on failure Overriden by |
# | ||||||
public
|
read(string $key): mixed
Read a key from the cache
Read a key from the cache Parameters
ReturnsThe cached data, or false if the data doesn't exist, has expired, or if there was an error fetching it Overriden by |
# | ||||||
public
|
delete(string $key): boolean
Delete a key from the cache
Delete a key from the cache Parameters
ReturnsTrue if the value was successfully deleted, false if it didn't exist or couldn't be removed Overriden by |
# | ||||||
public
|
clear(boolean $check): boolean
Delete all keys from the cache
Delete all keys from the cache Parameters
ReturnsTrue if the cache was successfully cleared, false otherwise Overriden by |
# | ||||||
public
|
settings(): array
Cache Engine settings
Cache Engine settings Returnssettings |
# |
Properties | |||
---|---|---|---|
public
|
array
|
$settings
|
# |