Vergleich inc/cachehandlers/apc.php - 1.8.5 - 1.8.6

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 15Zeile 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 31Zeile 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 43Zeile 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 54Zeile 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 65Zeile 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 83Zeile 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 93Zeile 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;