Class JCacheStorageMemcache
Memcache cache storage handler
-
JCacheStorage
-
JCacheStorageMemcache
Methods summary
public
|
#
__construct( array $options = array() )
Constructor
Parameters
- $options
array - $options Optional parameters.
Since
11.1
Overrides
|
protected
|
#
getConnection( )
Create the Memcache connection
Create the Memcache connection
Throws
Since
11.1
|
protected
string
|
#
_getCacheId( string $id, string $group )
Get a cache_id string from an id/group pair
Get a cache_id string from an id/group pair
Parameters
- $id
string - $id The cache data id
- $group
string - $group The cache data group
Returns
string - The cache_id string
Since
11.1
Overrides
|
public
boolean
|
#
contains( string $id, string $group )
Check if the cache contains data stored by ID and group
Check if the cache contains data stored by ID and group
Parameters
- $id
string - $id The cache data ID
- $group
string - $group The cache data group
Returns
boolean
Since
3.7.0
Overrides
|
public
mixed
|
#
get( string $id, string $group, boolean $checkTime = true )
Get cached data by ID and group
Get cached data by ID and group
Parameters
- $id
string - $id The cache data ID
- $group
string - $group The cache data group
- $checkTime
boolean - $checkTime True to verify cache time expiration threshold
Returns
mixed - Boolean false on failure or a cached data object
Since
11.1
Overrides
|
public
mixed
|
#
getAll( )
Get all cached data
Returns
mixed - Boolean false on failure or a cached data object
Since
11.1
Overrides
|
public
boolean
|
#
store( string $id, string $group, string $data )
Store the data to cache by ID and group
Store the data to cache by ID and group
Parameters
- $id
string - $id The cache data ID
- $group
string - $group The cache data group
- $data
string - $data The data to store in cache
Returns
boolean
Since
11.1
Overrides
|
public
boolean
|
#
remove( string $id, string $group )
Remove a cached data entry by ID and group
Remove a cached data entry by ID and group
Parameters
- $id
string - $id The cache data ID
- $group
string - $group The cache data group
Returns
boolean
Since
11.1
Overrides
|
public
boolean
|
#
clean( string $group, string $mode = null )
Clean cache for a group given a mode.
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
Parameters
- $group
string - $group The cache data group
- $mode
string - $mode The mode for cleaning cache [group|notgroup]
Returns
boolean
Since
11.1
Overrides
|
public
boolean
|
#
flush( )
Flush all existing items in storage.
Flush all existing items in storage.
Returns
boolean
Since
3.6.3
Overrides
|
public static
boolean
|
#
isSupported( )
Test to see if the storage handler is available.
Test to see if the storage handler is available.
Returns
boolean
Since
12.1
Overrides
|
public
mixed
|
#
lock( string $id, string $group, integer $locktime )
Lock cached item
Parameters
- $id
string - $id The cache data ID
- $group
string - $group The cache data group
- $locktime
integer - $locktime Cached item max lock time
Returns
mixed - Boolean false if locking failed or an object containing properties lock and
locklooped
Since
11.1
Overrides
|
public
boolean
|
#
unlock( string $id, string $group = null )
Unlock cached item
Parameters
- $id
string - $id The cache data ID
- $group
string - $group The cache data group
Returns
boolean
Since
11.1
Overrides
|
protected
boolean
|
#
lockindex( )
Lock cache index
Returns
boolean
Since
11.1
|
protected
boolean
|
#
unlockindex( )
Unlock cache index
Returns
boolean
Since
11.1
|
addIncludePath()
,
gc()
,
getInstance()
,
test()
Magic methods summary
Properties summary
protected static
Memcache
|
$_db
|
#
Memcache connection object
Memcache connection object
Since
11.1
|
protected
integer
|
$_compress
|
#
Payload compression level
Payload compression level
Since
11.1
|
$_application
,
$_hash
,
$_language
,
$_lifetime
,
$_locking
,
$_now
,
$rawname