CRM_Utils_Cache_Interface
interface CRM_Utils_Cache_Interface implements CacheInterface
Methods
Get a value from the cache.
Delete a value from the cache.
Delete all values from the cache.
Determines whether an item is present in the cache.
Details
at line 50
bool
set(string $key, mixed $value, null|int|DateInterval $ttl = NULL)
Set the value in the cache.
at line 60
mixed
get(string $key, mixed $default = NULL)
Get a value from the cache.
at line 68
bool
delete(string $key)
Delete a value from the cache.
at line 80
bool
flush()
deprecated
deprecated
Delete all values from the cache.
NOTE: flush() and clear() should be aliases. flush() is specified by Civi's traditional interface, and clear() is specified by PSR-16.
at line 91
bool
clear()
Delete all values from the cache.
NOTE: flush() and clear() should be aliases. flush() is specified by Civi's traditional interface, and clear() is specified by PSR-16.
at line 105
bool
has(string $key)
Determines whether an item is present in the cache.
NOTE: It is recommended that has() is only to be used for cache warming type purposes and not to be used within your live applications operations for get/set, as this method is subject to a race condition where your has() will return true and immediately after, another script can remove it making the state of your app out of date.