MemcachedStorage
class MemcachedStorage extends CacheStorage
Memcached cache storage handler
Properties
protected string
Since: 1.7.0
|
$rawname | The raw object name |
from CacheStorage |
int
Since: 1.7.0
|
$_now | Time that the cache storage handler was instantiated |
from CacheStorage |
int
Since: 1.7.0
|
$_lifetime | Cache lifetime |
from CacheStorage |
bool
Since: 1.7.0
|
$_locking | Flag if locking is enabled |
from CacheStorage |
string
Since: 1.7.0
|
$_language | Language code |
from CacheStorage |
string
Since: 1.7.0
|
$_application | Application name |
from CacheStorage |
string
Since: 1.7.0
|
$_hash | Object hash |
from CacheStorage |
int
Since: 4.3.0
|
$_threshold | The threshold |
from CacheStorage |
static protected Memcached
Since: 3.0.0
|
$_db | Memcached connection object |
|
protected int
Since: 3.0.0
|
$_compress | Payload compression level |
Methods
Constructor
Returns a cache storage handler object.
Check if the cache contains data stored by ID and group
Get cached data by ID and group
Get all cached data
Store the data to cache by ID and group
Remove a cached data entry by ID and group
Clean cache for a group given a mode.
Flush all existing items in storage.
Test to see if the storage handler is available.
Lock cached item
Unlock cached item
Get a cache_id string from an id/group pair
Add a directory where CacheStorage should search for handlers. You may either pass a string or an array of directories.
Create the Memcached connection
Lock cache index
Unlock cache index
Details
static CacheStorage
getInstance(string $handler = null, array $options = [])
Returns a cache storage handler object.
bool
contains(string $id, string $group)
Check if the cache contains data stored by ID and group
mixed
get(string $id, string $group, bool $checkTime = true)
Get cached data by ID and group
bool
store(string $id, string $group, string $data)
Store the data to cache by ID and group
bool
clean(string $group, string $mode = null)
Clean cache for a group given a mode.
group mode : cleans all cache in the group notgroup mode : cleans all cache not in the group
protected string
_getCacheId(string $id, string $group)
Get a cache_id string from an id/group pair