Zeile 15 | Zeile 15 |
---|
{ /** * Unique identifier representing this copy of MyBB
|
{ /** * Unique identifier representing this copy of MyBB
|
*/
| * * @var string */
|
public $unique_id;
|
public $unique_id;
|
| /** * @param bool $silent ignored */
|
function eacceleratorCacheHandler($silent=false) { global $mybb;
| function eacceleratorCacheHandler($silent=false) { global $mybb;
|
Zeile 32 | Zeile 37 |
---|
die; } }
|
die; } }
|
return false;
| |
}
/**
| }
/**
|
Zeile 42 | Zeile 46 |
---|
*/ function connect() {
|
*/ function connect() {
|
global $mybb;
| |
// Set a unique identifier for all queries in case other forums on this server also use this cache handler $this->unique_id = md5(MYBB_ROOT);
|
// Set a unique identifier for all queries in case other forums on this server also use this cache handler $this->unique_id = md5(MYBB_ROOT);
|
|
|
return true; }
/** * Retrieve an item from the cache. *
|
return true; }
/** * Retrieve an item from the cache. *
|
* @param string The name of the cache * @param boolean True if we should do a hard refresh
| * @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) { $data = eaccelerator_get($this->unique_id."_".$name);
| function fetch($name, $hard_refresh=false) { $data = eaccelerator_get($this->unique_id."_".$name);
|
Zeile 67 | Zeile 68 |
---|
}
return unserialize($data);
|
}
return unserialize($data);
|
}
/**
| }
/**
|
* Write an item to the cache. *
|
* Write an item to the cache. *
|
* @param string The name of the cache * @param mixed The data to write to the cache item
| * @param string $name The name of the cache * @param mixed $contents The data to write to the cache item
|
* @return boolean True on success, false on failure */ function put($name, $contents)
| * @return boolean True on success, false on failure */ function put($name, $contents)
|
Zeile 87 | Zeile 88 |
---|
/** * Delete a cache *
|
/** * Delete a cache *
|
* @param string The name of the cache
| * @param string $name The name of the cache
|
* @return boolean True on success, false on failure */ function delete($name)
| * @return boolean True on success, false on failure */ function delete($name)
|
Zeile 97 | Zeile 98 |
---|
/** * Disconnect from the cache
|
/** * Disconnect from the cache
|
*/
| * * @return bool */
|
function disconnect() { return true; }
|
function disconnect() { return true; }
|
| /** * @param string $name * * @return string */
|
function size_of($name) { global $lang;
| function size_of($name) { global $lang;
|