diff options
Diffstat (limited to 'phpBB/phpbb/cache/driver/memory.php')
| -rw-r--r-- | phpBB/phpbb/cache/driver/memory.php | 12 | 
1 files changed, 6 insertions, 6 deletions
| diff --git a/phpBB/phpbb/cache/driver/memory.php b/phpBB/phpbb/cache/driver/memory.php index 0b0e323e3d..baae22d809 100644 --- a/phpBB/phpbb/cache/driver/memory.php +++ b/phpBB/phpbb/cache/driver/memory.php @@ -81,9 +81,10 @@ abstract class memory extends \phpbb\cache\driver\base  	*/  	function tidy()  	{ -		// cache has auto GC, no need to have any code here :) +		global $config; -		set_config('cache_last_gc', time(), true); +		// cache has auto GC, no need to have any code here :) +		$config->set('cache_last_gc', time(), false);  	}  	/** @@ -203,7 +204,7 @@ abstract class memory extends \phpbb\cache\driver\base  	{  		// Remove extra spaces and tabs  		$query = preg_replace('/[\n\r\s\t]+/', ' ', $query); -		$hash = md5($query); +		$query_id = md5($query);  		// determine which tables this query belongs to  		// Some queries use backticks, namely the get_database_size() query @@ -244,14 +245,13 @@ abstract class memory extends \phpbb\cache\driver\base  				$temp = array();  			} -			$temp[$hash] = true; +			$temp[$query_id] = true;  			// This must never expire  			$this->_write('sql_' . $table_name, $temp, 0);  		}  		// store them in the right place -		$query_id = sizeof($this->sql_rowset);  		$this->sql_rowset[$query_id] = array();  		$this->sql_row_pointer[$query_id] = 0; @@ -261,7 +261,7 @@ abstract class memory extends \phpbb\cache\driver\base  		}  		$db->sql_freeresult($query_result); -		$this->_write('sql_' . $hash, $this->sql_rowset[$query_id], $ttl); +		$this->_write('sql_' . $query_id, $this->sql_rowset[$query_id], $ttl);  		return $query_id;  	} | 
