objectcache: deleteObjectsExpiringBefore() signature and code improvements
authorAaron Schulz <aschulz@wikimedia.org>
Tue, 9 Jul 2019 06:02:05 +0000 (23:02 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Tue, 9 Jul 2019 09:32:06 +0000 (02:32 -0700)
commit4245a2c2005990ee63688bc8153907a7486e2316
tree3823bc92a59d2ae931426c9d607ca8560cfd47aa
parent434015880aab5b155cc7edd6fcddf1883d0395eb
objectcache: deleteObjectsExpiringBefore() signature and code improvements

Make the method use a callable type hint for $progressCallback.

Also make the SQLBagOStuff subclass shuffle() the array of server and table
indexes in case the limit keeps getting applied. Only garbage collect on DBs
that were going to be written to anyway. Also use DeferredUpdates if possible.

Change-Id: I723e6377c26750ff98e33f7ab103c6162ae65f43
includes/libs/objectcache/BagOStuff.php
includes/libs/objectcache/CachedBagOStuff.php
includes/libs/objectcache/MultiWriteBagOStuff.php
includes/libs/objectcache/ReplicatedBagOStuff.php
includes/objectcache/SqlBagOStuff.php