summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabianx2018-08-17 15:20:55 (GMT)
committerJeremy Andrews2018-08-17 15:20:55 (GMT)
commitd613243480b7a44fb8a1e90fad7fe285e9e7f303 (patch)
tree4095f4e33c588b2418394f4a4923d8ebf19ca21f
parent38c8b9b8ae2fe29204186f5cbc5960f9a9c5c1bd (diff)
Issue #2993368 by marco, Fabianx: Stampede protection will not load new data from cache, but instead make old invalid data valid again
-rw-r--r--memcache.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/memcache.inc b/memcache.inc
index 729fa9f..2addd5c 100644
--- a/memcache.inc
+++ b/memcache.inc
@@ -115,12 +115,12 @@ class MemCacheDrupal implements DrupalCacheInterface {
* @param string $cid
* The cache id of the item
* @param mixed $cache
- * The cache item.
+ * The cache item, which will be updated if needed.
*
* @return bool
* Whether the item is valid.
*/
- protected function valid($cid, $cache) {
+ protected function valid($cid, &$cache) {
if ($cache) {
$cache_tables = isset($_SESSION['cache_flush']) ? $_SESSION['cache_flush'] : NULL;
// Items that have expired are invalid.