objectcache: Remove broken apcu_set() calls
authorAaron Schulz <aschulz@wikimedia.org>
Tue, 6 Dec 2016 06:03:21 +0000 (01:03 -0500)
committerKrinkle <krinklemail@gmail.com>
Tue, 6 Dec 2016 15:39:42 +0000 (15:39 +0000)
The method call was misnamed (should be apcu_store) and not needed anyway,
since the other BagOStuff classes fail if no key is present.

Change-Id: I726965e665c2d0c5843d8dd33504810d130b9e98

includes/libs/objectcache/APCUBagOStuff.php

index 02b3c92..6e6a3ad 100644 (file)
@@ -72,7 +72,7 @@ class APCUBagOStuff extends APCBagOStuff {
                if ( apcu_exists( $key . self::KEY_SUFFIX ) ) {
                        return apcu_inc( $key . self::KEY_SUFFIX, $value );
                } else {
-                       return apcu_set( $key . self::KEY_SUFFIX, $value );
+                       return false;
                }
        }
 
@@ -85,7 +85,7 @@ class APCUBagOStuff extends APCBagOStuff {
                if ( apcu_exists( $key . self::KEY_SUFFIX ) ) {
                        return apcu_dec( $key . self::KEY_SUFFIX, $value );
                } else {
-                       return apcu_set( $key . self::KEY_SUFFIX, -$value );
+                       return false;
                }
        }
 }