Open Journal Systems
3.3.0
|
Public Member Functions | |
__construct ($context, $cacheId, $fallback, $hostname, $port) | |
close () | |
flush () | |
getCache ($id) | |
getCacheTime () | |
setCache ($id, $value) | |
setEntireCache ($contents) | |
setExpiry ($expiry) | |
setFlag ($flag) | |
Public Member Functions inherited from GenericCache | |
__construct ($context, $cacheId, $fallback) | |
get ($id) | |
getCacheId () | |
getContext () | |
set ($id, $value) | |
Data Fields | |
$connection | |
$expire | |
$flag | |
Data Fields inherited from GenericCache | |
$cacheId | |
$cacheMiss | |
$context | |
$fallback | |
Provides caching based on Memcache.
Definition at line 29 of file MemcacheCache.inc.php.
MemcacheCache::__construct | ( | $context, | |
$cacheId, | |||
$fallback, | |||
$hostname, | |||
$port | |||
) |
Instantiate a cache.
Definition at line 48 of file MemcacheCache.inc.php.
References GenericCache\$cacheId, GenericCache\$context, and GenericCache\$fallback.
MemcacheCache::close | ( | ) |
Close the cache and free resources.
Reimplemented from GenericCache.
Definition at line 119 of file MemcacheCache.inc.php.
MemcacheCache::flush | ( | ) |
Flush the cache.
Reimplemented from GenericCache.
Definition at line 79 of file MemcacheCache.inc.php.
MemcacheCache::getCache | ( | $id | ) |
Get an object from the cache.
$id |
Reimplemented from GenericCache.
Definition at line 87 of file MemcacheCache.inc.php.
References GenericCache\$cacheMiss, GenericCache\getCacheId(), and GenericCache\getContext().
MemcacheCache::getCacheTime | ( | ) |
Get the time at which the data was cached. Note that keys expire in memcache, which means that it's possible that the date will disappear before the data – in this case we'll have to assume the data is still good.
Reimplemented from GenericCache.
Definition at line 132 of file MemcacheCache.inc.php.
MemcacheCache::setCache | ( | $id, | |
$value | |||
) |
Set an object in the cache. This function should be overridden by subclasses.
$id | |
$value |
Reimplemented from GenericCache.
Definition at line 107 of file MemcacheCache.inc.php.
Referenced by setEntireCache().
MemcacheCache::setEntireCache | ( | $contents | ) |
Set the entire contents of the cache. WARNING: THIS DOES NOT FLUSH THE CACHE FIRST! This is because there is no "scope restriction" for flushing within memcache and therefore a flush here would flush the entire cache, resulting in more subsequent calls to this function, resulting in more flushes, etc.
Reimplemented from GenericCache.
Definition at line 145 of file MemcacheCache.inc.php.
References setCache().
MemcacheCache::setExpiry | ( | $expiry | ) |
Set the expiry time (used in Memcache::set)
Definition at line 72 of file MemcacheCache.inc.php.
MemcacheCache::setFlag | ( | $flag | ) |
Set the flag (used in Memcache::set)
Definition at line 65 of file MemcacheCache.inc.php.
References $flag.
MemcacheCache::$connection |
Connection to use for caching.
Definition at line 33 of file MemcacheCache.inc.php.
MemcacheCache::$expire |
Expiry (used by Memcache::set)
Definition at line 43 of file MemcacheCache.inc.php.
MemcacheCache::$flag |
Flag (used by Memcache::set)
Definition at line 38 of file MemcacheCache.inc.php.
Referenced by setFlag().