Zeile 11 | Zeile 11 |
---|
/** * Memcached Cache Handler */
|
/** * Memcached Cache Handler */
|
class memcachedCacheHandler
| class memcachedCacheHandler implements CacheHandlerInterface
|
{ /** * The memcached server resource
| { /** * The memcached server resource
|
Zeile 27 | Zeile 27 |
---|
*/ public $unique_id;
|
*/ public $unique_id;
|
/** * @param bool $silent ignored */ function memcachedCacheHandler($silent=false)
| function __construct()
|
{ global $mybb;
| { global $mybb;
|
Zeile 98 | Zeile 95 |
---|
* Retrieve an item from the cache. * * @param string $name The name of the cache
|
* Retrieve an item from the cache. * * @param string $name The name of the cache
|
* @param boolean $hard_refresh True if we should do a hard refresh
| |
* @return mixed Cache data if successful, false if failure */
|
* @return mixed Cache data if successful, false if failure */
|
function fetch($name, $hard_refresh=false)
| function fetch($name)
|
{ $data = $this->memcached->get($this->unique_id."_".$name);
| { $data = $this->memcached->get($this->unique_id."_".$name);
|
Zeile 143 | Zeile 139 |
---|
*/ function disconnect() {
|
*/ function disconnect() {
|
@$this->memcached->close();
| @$this->memcached->quit();
|
}
/**
| }
/**
|
Zeile 151 | Zeile 147 |
---|
* * @return string */
|
* * @return string */
|
function size_of($name)
| function size_of($name='')
|
{ global $lang;
| { global $lang;
|