Commit 9dc9449a authored by catch's avatar catch
Browse files

Issue #1131370 by das-peter: wildcard_invalidate variable was not properly updated to 7.x.

parent 5c11809b
...@@ -257,7 +257,7 @@ class MemCacheDrupal implements DrupalCacheInterface { ...@@ -257,7 +257,7 @@ class MemCacheDrupal implements DrupalCacheInterface {
// valid wildcard flushes in this bin. // valid wildcard flushes in this bin.
if (isset($wildcard_flushes[$this->bin][$wildcard_key])) { if (isset($wildcard_flushes[$this->bin][$wildcard_key])) {
foreach ($wildcard_flushes[$this->bin][$wildcard_key] as $flush_length => $timestamp) { foreach ($wildcard_flushes[$this->bin][$wildcard_key] as $flush_length => $timestamp) {
if ($length >= $flush_length && $timestamp >= ($_SERVER['REQUEST_TIME'] - $wildcard_invalidate)) { if ($length >= $flush_length && $timestamp >= ($_SERVER['REQUEST_TIME'] - $this->invalidate)) {
$key = '.wildcard-' . substr($cid, 0, $flush_length); $key = '.wildcard-' . substr($cid, 0, $flush_length);
$wildcard = dmemcache_key($key, $this->bin); $wildcard = dmemcache_key($key, $this->bin);
if (isset($wildcards[$this->bin][$wildcard])) { if (isset($wildcards[$this->bin][$wildcard])) {
...@@ -300,7 +300,7 @@ class MemCacheDrupal implements DrupalCacheInterface { ...@@ -300,7 +300,7 @@ class MemCacheDrupal implements DrupalCacheInterface {
// Avoid too many calls to variable_set() by only recording a flush for // Avoid too many calls to variable_set() by only recording a flush for
// a fraction of the wildcard invalidation variable, per cid length. // a fraction of the wildcard invalidation variable, per cid length.
// Defaults to 28 / 4, or one week. // Defaults to 28 / 4, or one week.
if (!isset($this->wildcard_flushes[$this->bin][$key][$length]) || ($_SERVER['REQUEST_TIME'] - $this->wildcard_flushes[$this->bin][$key][$length] > $wildcard_invalidate / 4)) { if (!isset($this->wildcard_flushes[$this->bin][$key][$length]) || ($_SERVER['REQUEST_TIME'] - $this->wildcard_flushes[$this->bin][$key][$length] > $this->invalidate / 4)) {
// If there are more than 50 different wildcard keys for this bin // If there are more than 50 different wildcard keys for this bin
// shorten the key by one, this should reduce variability by // shorten the key by one, this should reduce variability by
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment