MemcachedStorage
Extends CacheStorageMemcached cache storage handler
link | |
---|---|
since |
3.0.0 |
package |
Joomla CMS |
Methods
__construct
Constructor
__construct(mixed||string|int options = []) :
since |
3.0.0 |
---|
Arguments
- options
array<string|int, mixed>
Optional parameters.
Response
mixed
_getCacheId
Get a cache_id string from an id/group pair
_getCacheId( id, group) :
since |
1.7.0 |
---|
Arguments
- id
string
The cache data id- group
string
The cache data group
Response
string
The cache_id string
addIncludePath
Add a directory where CacheStorage should search for handlers. You may either pass a string or an array of directories.
addIncludePath(array|string path = '') : mixed||string|int
since |
1.7.0 |
---|
Arguments
- path
array<string|int, mixed>|string
A path to search.
Response
array<string|int, mixed>
An array with directory elements
clean
Clean cache for a group given a mode.
clean( group, mode = null) :
group mode : cleans all cache in the group notgroup mode : cleans all cache not in the group
since |
3.0.0 |
---|
Arguments
- group
string
The cache data group- mode
string
The mode for cleaning cache [group|notgroup]
Response
bool
contains
Check if the cache contains data stored by ID and group
contains( id, group) :
since |
3.7.0 |
---|
Arguments
- id
string
The cache data ID- group
string
The cache data group
Response
bool
flush
Flush all existing items in storage.
flush() :
since |
3.6.3 |
---|
Response
bool
gc
Garbage collect expired cache data
gc() :
since |
1.7.0 |
---|
Response
bool
get
Get cached data by ID and group
get( id, group, checkTime = true) :
since |
3.0.0 |
---|
Arguments
- id
string
The cache data ID- group
string
The cache data group- checkTime
bool
True to verify cache time expiration threshold
Response
mixed
Boolean false on failure or a cached data object
getAll
Get all cached data
getAll() :
since |
3.0.0 |
---|
Response
mixed
Boolean false on failure or a cached data object
getConnection
Create the Memcached connection
getConnection() :
since |
3.0.0 |
---|---|
throws |
|
Response
void
getInstance
Returns a cache storage handler object.
getInstance( handler = null, mixed||string|int options = []) : \Joomla\CMS\Cache\CacheStorage
since |
1.7.0 |
---|---|
throws |
|
Arguments
- handler
string
The cache storage handler to instantiate- options
array<string|int, mixed>
Array of handler options
Response
isSupported
Test to see if the storage handler is available.
isSupported() :
since |
3.0.0 |
---|
Response
bool
lock
Lock cached item
lock( id, group, locktime) :
since |
3.0.0 |
---|
Arguments
- id
string
The cache data ID- group
string
The cache data group- locktime
int
Cached item max lock time
Response
mixed
Boolean false if locking failed or an object containing properties lock and locklooped
lockindex
Lock cache index
lockindex() :
since |
3.0.0 |
---|
Response
bool
remove
Remove a cached data entry by ID and group
remove( id, group) :
since |
3.0.0 |
---|
Arguments
- id
string
The cache data ID- group
string
The cache data group
Response
bool
store
Store the data to cache by ID and group
store( id, group, data) :
since |
3.0.0 |
---|
Arguments
- id
string
The cache data ID- group
string
The cache data group- data
string
The data to store in cache
Response
bool
unlock
Unlock cached item
unlock( id, group = null) :
since |
3.0.0 |
---|
Arguments
- id
string
The cache data ID- group
string
The cache data group
Response
bool
unlockindex
Unlock cache index
unlockindex() :
since |
3.0.0 |
---|
Response
bool
Properties
rawname
The raw object name
since |
1.7.0 |
---|
Type(s)
string
_now
Time that the cache storage handler was instantiated
since |
1.7.0 |
---|
Type(s)
int
_lifetime
Cache lifetime
since |
1.7.0 |
---|
Type(s)
int
_locking
Flag if locking is enabled
since |
1.7.0 |
---|
Type(s)
bool
_language
Language code
since |
1.7.0 |
---|
Type(s)
string
_application
Application name
since |
1.7.0 |
---|
Type(s)
string
_hash
Object hash
since |
1.7.0 |
---|
Type(s)
string
_threshold
The threshold
since |
4.3.0 |
---|
Type(s)
int
_db
Memcached connection object
since |
3.0.0 |
---|
Type(s)
Memcached
_compress
Payload compression level
since |
3.0.0 |
---|
Type(s)
int