From: Aaron Schulz Date: Fri, 9 Aug 2019 22:35:28 +0000 (-0700) Subject: objectcache: make MediumSpecificBagOStuff::mergeViaCas() handle negative TTLs X-Git-Tag: 1.34.0-rc.0~589^2 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=7f25cf3031072f9b088c811b689724d0cac25bca;p=lhc%2Fweb%2Fwiklou.git objectcache: make MediumSpecificBagOStuff::mergeViaCas() handle negative TTLs Change-Id: Ieb503cdb5d0849be7b7be21780ae552ab937ae80 --- 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