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

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 16Zeile 16
	/**
* Connect and initialize this handler.
*

	/**
* Connect and initialize this handler.
*

 
	 * @param bool $silent ignored

	 * @return boolean True if successful, false on failure
*/
function connect($silent=false)

	 * @return boolean True if successful, false on failure
*/
function connect($silent=false)

Zeile 31Zeile 32
	/**
* Retrieve an item from the cache.
*

	/**
* 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)
{
if(!@file_exists(MYBB_ROOT."/cache/{$name}.php"))

	function fetch($name, $hard_refresh=false)
{
if(!@file_exists(MYBB_ROOT."/cache/{$name}.php"))

		{
return false;
}


		{
return false;
}


		if(!isset($this->cache[$name]) || $hard_refresh == true)
{
@include(MYBB_ROOT."/cache/{$name}.php");

		if(!isset($this->cache[$name]) || $hard_refresh == true)
{
@include(MYBB_ROOT."/cache/{$name}.php");

Zeile 54Zeile 54

// Return data
return $$name;


// Return data
return $$name;

	}

/**

	}

/**

	 * 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 86Zeile 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 96Zeile 96

/**
* Disconnect from the cache


/**
* Disconnect from the cache

 
	 *
* @return bool

	 */
function disconnect()
{

	 */
function disconnect()
{

Zeile 105Zeile 107
	/**
* Select the size of the disk cache
*

	/**
* Select the size of the disk cache
*

	 * @param string The name of the cache

	 * @param string $name The name of the cache

	 * @return integer the size of the disk cache
*/
function size_of($name='')

	 * @return integer the size of the disk cache
*/
function size_of($name='')