Index: sites/all/modules/cacherouter/engines/db.php =================================================================== --- sites/all/modules/cacherouter/engines/db.php (revision 1) +++ sites/all/modules/cacherouter/engines/db.php (working copy) @@ -1,6 +1,6 @@ content[$key])) { - return $this->content[$key]; - } +// if (isset($this->content[$key])) { +// return $this->content[$key]; +// } // Handle garbage collection $this->gc(); @@ -44,16 +44,17 @@ } } } - $this->content[$key] = $cache; +// $this->content[$key] = $cache; + return $cache; } return 0; } function set($key, $value, $expire = CACHE_PERMANENT, $headers = NULL) { - unset($this->content[$key]); +// unset($this->content[$key]); $serialized = 0; - if (!is_string($value)) { + if (is_object($value) || is_array($value)) { $value = serialize($value); $serialized = 1; } @@ -65,7 +66,7 @@ } function delete($key) { - unset($this->content[$key]); +// unset($this->content[$key]); if (substr($key, -1, 1) == '*') { if ($key == '*') { db_query("DELETE FROM {". $this->name ."}"); @@ -82,7 +83,7 @@ function flush($flush = '') { $flush = empty($flush) ? time() : $flush; - $this->content = array(); +// $this->content = array(); db_query("DELETE FROM {". $this->name ."} WHERE expire != %d AND expire < %d", CACHE_PERMANENT, $flush); } @@ -91,7 +92,7 @@ $cache_flush = variable_get('cache_flush', 0); if ($cache_flush && ($cache_flush + variable_get('cache_lifetime', 0) <= time())) { // Reset the variable immediately to prevent a meltdown in heavy load situations. - variable_set('cache_flush', 0); + variable_set('cache_flush_'. $table, 0); // Time to flush old cache data $this->flush($cache_flush); }