From f9de39b225d6451666e0309fb84e47f68e7cf6c7 Mon Sep 17 00:00:00 2001 From: gRoussac Date: Fri, 5 Apr 2013 17:59:46 +0200 Subject: [PATCH] [-] BO : Fix bug #PSCFV-8540 setting cookie key in cache key --- classes/cache/Cache.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/classes/cache/Cache.php b/classes/cache/Cache.php index b4ee3de1d..9343f04e7 100755 --- a/classes/cache/Cache.php +++ b/classes/cache/Cache.php @@ -205,7 +205,6 @@ abstract class CacheCore foreach ($this->keys as $k => $ttl) if (preg_match('#^'.$pattern.'$#', $k)) $keys[] = $k; - } // Delete keys @@ -235,13 +234,13 @@ abstract class CacheCore if (is_null($this->sql_tables_cached)) { - $this->sql_tables_cached = $this->get(self::SQL_TABLES_NAME); + $this->sql_tables_cached = $this->get(_COOKIE_IV_.self::SQL_TABLES_NAME); if (!is_array($this->sql_tables_cached)) $this->sql_tables_cached = array(); } // Store query results in cache if this query is not already cached - $key = md5($query); + $key = md5(_COOKIE_IV_.$query); if ($this->exists($key)) return true; $this->set($key, $result); @@ -251,7 +250,7 @@ abstract class CacheCore foreach ($tables as $table) if (!isset($this->sql_tables_cached[$table][$key])) $this->sql_tables_cached[$table][$key] = true; - $this->set(self::SQL_TABLES_NAME, $this->sql_tables_cached); + $this->set(_COOKIE_IV_.self::SQL_TABLES_NAME, $this->sql_tables_cached); } protected function getTables($string) @@ -271,7 +270,7 @@ abstract class CacheCore { if (is_null($this->sql_tables_cached)) { - $this->sql_tables_cached = $this->get(self::SQL_TABLES_NAME); + $this->sql_tables_cached = $this->get(_COOKIE_IV_.self::SQL_TABLES_NAME); if (!is_array($this->sql_tables_cached)) $this->sql_tables_cached = array(); } @@ -287,7 +286,7 @@ abstract class CacheCore } unset($this->sql_tables_cached[$table]); } - $this->set(self::SQL_TABLES_NAME, $this->sql_tables_cached); + $this->set(_COOKIE_IV_.self::SQL_TABLES_NAME, $this->sql_tables_cached); } /**