Merge "objectcache: make MediumSpecificBagOStuff::mergeViaCas() handle negative TTLs"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Sun, 25 Aug 2019 16:57:41 +0000 (16:57 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sun, 25 Aug 2019 16:57:41 +0000 (16:57 +0000)
includes/libs/objectcache/MediumSpecificBagOStuff.php

index cb3f621..9d36187 100644 (file)
@@ -293,7 +293,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 ( $valueMatchesOldValue && $attemptsLeft !== $attempts ) {
                                $success = true; // recently set by another thread to the same value