CRM_Utils_Cache_Memcache
class CRM_Utils_Cache_Memcache implements CRM_Utils_Cache_Interface
Traits
Constants
DEFAULT_HOST |
|
DEFAULT_PORT |
|
DEFAULT_TIMEOUT |
|
DEFAULT_PREFIX |
|
NS_LOCAL_TTL |
If another process clears namespace, we'll find out in ~5 sec. |
Properties
protected string | $_host | The host name of the memcached server. | |
protected int | $_port | The port on which to connect on. | |
protected int | $_timeout | The default timeout to use. | |
protected string | $_prefix | The prefix prepended to cache keys. | |
protected Memcache | $_cache | The actual memcache object. | |
protected NULL|array | $_truePrefix |
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
No description
No description
Delete all values from the cache.
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 104
CRM_Utils_Cache_Memcache
__construct(array $config)
Constructor.
at line 134
bool
set(string $key, mixed $value, null|int|DateInterval $ttl = NULL)
at line 149
mixed
get(string $key, mixed $default = NULL)
at line 161
bool
has(string $key)
at line 172
bool
delete(string $key)
at line 181
bool
flush()
at line 187
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.