WANObjectCache: Change getWithSetCallback() signature to key/ttl/callback/opts
authorTimo Tijhof <krinklemail@gmail.com>
Wed, 7 Oct 2015 23:21:11 +0000 (16:21 -0700)
committerTimo Tijhof <krinklemail@gmail.com>
Thu, 8 Oct 2015 01:03:15 +0000 (18:03 -0700)
commit09cbebb22439bf4223e87ceb3e42169dc85fd311
tree10bb897afb044cf06e8e2d68914d2e63c2582104
parent14788f9aab16d36406c92c87b2a91c8ab90840b8
WANObjectCache: Change getWithSetCallback() signature to key/ttl/callback/opts

* Put 'checkKeys' param in opts array instead of as a separate parameter.
  It's neat to not have to skip unnamed/positional arguments that are optional.
* Move TTL to be before callback instead of after. This avoids dangling integers
  toward the bottom of a large code block that have no obvious meaning.
  Matches BagOStuff::getWithSetCallback.

Add unit test for lockTSE to confirm

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