Merge "Add hook for custom difference engine (WikEdDiff)"
[lhc/web/wiklou.git] / includes / objectcache / SqlBagOStuff.php
index b9a9985..df878f7 100644 (file)
@@ -514,6 +514,14 @@ class SqlBagOStuff extends BagOStuff {
                return $newValue;
        }
 
+       public function merge( $key, $callback, $exptime = 0, $attempts = 10 ) {
+               if ( !is_callable( $callback ) ) {
+                       throw new Exception( "Got invalid callback." );
+               }
+
+               return $this->mergeViaCas( $key, $callback, $exptime, $attempts );
+       }
+
        /**
         * @param DatabaseBase $db
         * @param string $exptime