CRM_Utils_Cache_SqlGroup
class CRM_Utils_Cache_SqlGroup implements CRM_Utils_Cache_Interface
This caching provider stores all cached items as a "group" in the "civicrm_cache" table. The entire 'group' may be prefetched when instantiating the cache provider.
Traits
Constants
DEFAULT_TTL |
|
TS_FMT |
|
Properties
protected string | $group | The host name of the memcached server. | |
protected int | $componentID | ||
protected array | $valueCache | In-memory cache to optimize redundant get()s. | |
protected array | $expiresCache | In-memory cache to optimize redundant get()s. | |
protected string | $table | Table. |
Methods
Obtains multiple cache items by their unique keys.
Persists a set of key => value pairs in the cache, with an optional TTL.
Deletes multiple cache items in a single operation.
Constructor.
No description
No description
Determines whether an item is present in the cache.
No description
Delete all values from the cache.
Delete all values from the cache.
No description
No description
Details
in CRM_Utils_Cache_NaiveMultipleTrait at line 53
iterable
getMultiple(iterable $keys, mixed $default = NULL)
Obtains multiple cache items by their unique keys.
in CRM_Utils_Cache_NaiveMultipleTrait at line 77
bool
setMultiple(iterable $values, null|int|DateInterval $ttl = NULL)
Persists a set of key => value pairs in the cache, with an optional TTL.
in CRM_Utils_Cache_NaiveMultipleTrait at line 101
bool
deleteMultiple(iterable $keys)
Deletes multiple cache items in a single operation.
at line 94
CRM_Utils_Cache_SqlGroup
__construct(array $config)
Constructor.
at line 120
bool
set(string $key, mixed $value, null|int|DateInterval $ttl = NULL)
at line 173
mixed
get(string $key, mixed $default = NULL)
at line 196
mixed
getFromFrontCache($key, null $default = NULL)
at line 205
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.
at line 214
bool
delete(string $key)
at line 227
bool
flush()
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 241
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.