[-] BO : Fix bug #PSCFV-8540 setting cookie key in cache key

This commit is contained in:
gRoussac
2013-04-05 17:59:46 +02:00
parent b101bdca71
commit f9de39b225
+5 -6
View File
@@ -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);
}
/**