objectcache: fix cache warmup bug in getMultiWithSetCallback()
authorAaron Schulz <aschulz@wikimedia.org>
Thu, 25 May 2017 00:59:50 +0000 (17:59 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Fri, 26 May 2017 04:28:13 +0000 (04:28 +0000)
commit0c24cefa12221fe13be75198df7a5e2300627994
tree57540a06a5ec47f86f9c170d33b1dcebf2a62663
parentf0e12ae951ef9f6cb359c5ecfcd3739e38f4d29a
objectcache: fix cache warmup bug in getMultiWithSetCallback()

The warmup cache was not properly prefixed and was also using the entity
IDs instead of the cache keys. Thus, it effectively just wasted a
getMulti() query and resulted in the usual separate GETs anyway.

Added some unit tests for this.

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