objectcache: Add "busyValue" option to WANObjectCache::getWithSetCallback
authorAaron Schulz <aschulz@wikimedia.org>
Fri, 22 Jul 2016 05:15:21 +0000 (22:15 -0700)
committerKrinkle <krinklemail@gmail.com>
Fri, 22 Jul 2016 22:24:38 +0000 (22:24 +0000)
commit1a081c6707764e04073df831e1b2a4a749601c5c
tree9969dd0f27de21ac5fd350ee35fa282e31c8c2b4
parent529c2edf302df86775b66fdbed401695b95ccfa8
objectcache: Add "busyValue" option to WANObjectCache::getWithSetCallback

This is useful for avoiding stampedes in the one case that lockTSE
does not alone cover, which is when the key does not exist or is
tombstoned.

Also avoid saving interim values unless the key is tombstoned
since there is no point in doing that otherwise.

Change-Id: I70997e90217a0979e0589afa7a5107b0e623c7cf
includes/libs/objectcache/WANObjectCache.php
tests/phpunit/includes/libs/objectcache/WANObjectCacheTest.php