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 __construct($silent=false) { global $mybb;
| function __construct($silent=false) { global $mybb;
|
Zeile 31 | Zeile 36 |
---|
$mybb->trigger_generic_error("apc_load_error"); die; }
|
$mybb->trigger_generic_error("apc_load_error"); die; }
|
}
return false; }
| } }
|
/** * Connect and initialize this handler. *
| /** * Connect and initialize this handler. *
|
Zeile 43 | 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);
|
Zeile 54 | Zeile 55 |
---|
/** * Connect and initialize this handler. *
|
/** * Connect and initialize this handler. *
|
| * @param string $name * @param bool $hard_refresh ignored
|
* @return boolean True if successful, false on failure
|
* @return boolean True if successful, false on failure
|
*/
| */
|
function fetch($name, $hard_refresh=false) { if(apc_exists($this->unique_id."_".$name))
| function fetch($name, $hard_refresh=false) { if(apc_exists($this->unique_id."_".$name))
|
Zeile 65 | Zeile 68 |
---|
}
return false;
|
}
return false;
|
}
| }
|
/** * 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 83 | Zeile 86 |
---|
/** * 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 93 | Zeile 96 |
---|
/** * 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;
|