From 7f25cf3031072f9b088c811b689724d0cac25bca Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Fri, 9 Aug 2019 15:35:28 -0700 Subject: [PATCH] objectcache: make MediumSpecificBagOStuff::mergeViaCas() handle negative TTLs Change-Id: Ieb503cdb5d0849be7b7be21780ae552ab937ae80 --- includes/libs/objectcache/MediumSpecificBagOStuff.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/libs/objectcache/MediumSpecificBagOStuff.php b/includes/libs/objectcache/MediumSpecificBagOStuff.php index fe17628e81..5e9ebcab03 100644 --- a/includes/libs/objectcache/MediumSpecificBagOStuff.php +++ b/includes/libs/objectcache/MediumSpecificBagOStuff.php @@ -323,7 +323,7 @@ abstract class MediumSpecificBagOStuff extends BagOStuff { unset( $currentValue ); // free RAM in case the value is large $this->clearLastError(); - if ( $value === false ) { + if ( $value === false || $exptime < 0 ) { $success = true; // do nothing } elseif ( $hadNoCurrentValue ) { // Try to create the key, failing if it gets created in the meantime -- 2.20.1