MemcacheStorage
class MemcacheStorage extends CacheStorage
Memcache cache storage handler
Properties
integer | $_now | Time that the cache storage handler was instantiated | from CacheStorage |
integer | $_lifetime | Cache lifetime | from CacheStorage |
boolean | $_locking | Flag if locking is enabled | from CacheStorage |
string | $_language | Language code | from CacheStorage |
string | $_application | Application name | from CacheStorage |
string | $_hash | Object hash | from CacheStorage |
Methods
__construct(
array $options = array())
Constructor
static
CacheStorage
getInstance(
string $handler = null,
array $options = array())
Returns a cache storage handler object.
from CacheStorage
boolean
contains(
string $id,
string $group)
Check if the cache contains data stored by ID and group
mixed
get(
string $id,
string $group,
boolean $checkTime = true)
Get cached data by ID and group
mixed
getAll()
Get all cached data
boolean
store(
string $id,
string $group,
string $data)
Store the data to cache by ID and group
boolean
remove(
string $id,
string $group)
Remove a cached data entry by ID and group
boolean
clean(
string $group,
string $mode = null)
Clean cache for a group given a mode.
boolean
flush()
Flush all existing items in storage.
static
boolean
isSupported()
Test to see if the storage handler is available.
mixed
lock(
string $id,
string $group,
integer $locktime)
Lock cached item
boolean
unlock(
string $id,
string $group = null)
Unlock cached item
static
array
addIncludePath(
array|string $path = '')
Add a directory where CacheStorage should search for handlers. You may either pass a string or an array of directories.
from CacheStorage
Details
static
CacheStorage
getInstance(
string $handler = null,
array $options = array())
Returns a cache storage handler object.
boolean
contains(
string $id,
string $group)
Check if the cache contains data stored by ID and group