objectcache: let BagOStuff::getWithSetCallback() callbacks modify the TTL
authorAaron Schulz <aschulz@wikimedia.org>
Tue, 23 Jul 2019 14:33:40 +0000 (07:33 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Tue, 23 Jul 2019 14:33:40 +0000 (07:33 -0700)
commitf3919c7c79b958769ad36ea6eba03ee9c8baf568
tree39aad03956ca8da969f2b804174b8e3b25117784
parentded74c4ee8e9c8b34059285fc3e1b54956c80ae5
objectcache: let BagOStuff::getWithSetCallback() callbacks modify the TTL

Also simplify the code by removing the is_callable() check and relying on
regular PHP errors instead of an exception for bad callbacks.

Change-Id: I084b0132c5fb05f1941a6d6839cfa74e2cf677f0
includes/libs/objectcache/BagOStuff.php
tests/phpunit/includes/libs/objectcache/BagOStuffTest.php