MemcachedCacheAdapter
- Full name:
\Qubus\Cache\Adapter\MemcachedCacheAdapter
- Parent class:
\Qubus\Cache\Adapter\Multiple
- This class implements:
\Qubus\Cache\Adapter\CacheAdapter
Properties
memcached
Methods
__construct
Parameters:
Parameter | Type | Description |
---|---|---|
$memcached | \Memcached |
get
Get a value from the cache store.
Parameters:
Parameter | Type | Description |
---|---|---|
$key | string | Cache key. |
Return Value:
Cache value corresponding to the key or null if no value was found.
See Also:
- \Qubus\Cache\Adapter\CacheAdapter::get() -
set
Sets a value into the cache store.
Parameters:
Parameter | Type | Description |
---|---|---|
$key | string | Cache key. |
$value | mixed | Value to cache. |
$ttl | ?int | Expiration time in seconds. Null means indefinite storage time. |
Return Value:
True if the value has been stored successfully. False otherwise.
See Also:
- \Qubus\Cache\Adapter\CacheAdapter::set() -
delete
Deletes a value from the cache store.
Parameters:
Parameter | Type | Description |
---|---|---|
$key | string | Cache key. |
Return Value:
True if the cached value has been successfully deleted. False otherwise.
See Also:
- \Qubus\Cache\Adapter\CacheAdapter::delete() -
has
Checks if a value has been cached.
Parameters:
Parameter | Type | Description |
---|---|---|
$key | string | Cache key. |
Return Value:
True if the cache key corresponds to a value. False otherwise.
See Also:
- \Qubus\Cache\Adapter\CacheAdapter::has() -
purge
Purge the store of all cache values.
Parameters:
Parameter | Type | Description |
---|---|---|
$pattern | ?string | Regex pattern for targeting only certain keys or null to purge everything. |
See Also:
- \Qubus\Cache\Adapter\CacheAdapter::purge() -
Inherited methods
getMultiple
Get multiple values from the cache store.
Parameters:
Parameter | Type | Description |
---|---|---|
$keys | array | Array of cache keys. |
Return Value:
Sequential array for each cache value corresponding to a key. Null will be assigned if value was not found.
setMultiple
Sets multiple values into the cache store.
Parameters:
Parameter | Type | Description |
---|---|---|
$values | array | Associative array indexed by the cache key. Cache value can be accessed through "value" key and ttl through "ttl" key. |
Return Value:
Returns null if all values have been stored successfully or an array representing all cache keys that cannot be stored.
deleteMultiple
Deletes multiple values from the cache store.
Parameters:
Parameter | Type | Description |
---|---|---|
$keys | array | An array of keys to delete |
Return Value:
A list of all keys that cannot be deleted or null if all keys has been deleted.
Automatically generated on 2025-10-13