Merge "objectcache: tweak SqlBagOStuff purging to happen on write only"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 8 Jul 2019 23:07:02 +0000 (23:07 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 8 Jul 2019 23:07:02 +0000 (23:07 +0000)
1  2 
includes/libs/objectcache/BagOStuff.php

@@@ -61,7 -61,7 +61,7 @@@ use Wikimedia\WaitConditionLoop
   *
   * @ingroup Cache
   */
 -abstract class BagOStuff implements IExpiringStore, LoggerAwareInterface {
 +abstract class BagOStuff implements IExpiringStore, IStoreKeyEncoder, LoggerAwareInterface {
        /** @var array[] Lock tracking */
        protected $locks = [];
        /** @var int ERR_* class constant */
         * @param string $date The reference date in MW format
         * @param callable|bool $progressCallback Optional, a function which will be called
         *     regularly during long-running operations with the percentage progress
-        *     as the first parameter.
+        *     as the first parameter. [optional]
+        * @param int $limit Maximum number of keys to delete [default: INF]
         *
         * @return bool Success, false if unimplemented
         */
-       public function deleteObjectsExpiringBefore( $date, $progressCallback = false ) {
+       public function deleteObjectsExpiringBefore( $date, $progressCallback = false, $limit = INF ) {
                // stub
                return false;
        }