objectcache: avoid using process cache in nested callbacks
authorAaron Schulz <aschulz@wikimedia.org>
Thu, 20 Oct 2016 21:47:03 +0000 (14:47 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Thu, 20 Oct 2016 22:13:29 +0000 (22:13 +0000)
commit43ff2a83b53e82193174fa78d9f300be6f5c79c7
treea272a37cf1d703a1c2c88fcd8adcbf37149cc4a5
parent6d9704caefde82e494a8eeffe7abee5978f9f7b1
objectcache: avoid using process cache in nested callbacks

Because the process cache can be lagged by virtue of blind TTL,
the HOLDOFF_TTL might not be enough to account for it, so avoid
using it when already inside a callback.

Also split of the tests from the MediaWiki test class, so this
does not require DB access anymore.

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