From b39fcc855c19b31f0bd673535a779940fa3cfccc Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 7 Oct 2015 20:51:00 -0700 Subject: [PATCH] Add get() flags support to BagOStuff::getWithSetCallback() Change-Id: Ib6046f5bc5d8c0481f90b56c381ba761fee558d6 --- includes/libs/objectcache/BagOStuff.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/libs/objectcache/BagOStuff.php b/includes/libs/objectcache/BagOStuff.php index ecdf48fc95..8cbd48a638 100644 --- a/includes/libs/objectcache/BagOStuff.php +++ b/includes/libs/objectcache/BagOStuff.php @@ -95,11 +95,12 @@ abstract class BagOStuff implements LoggerAwareInterface { * @param string $key * @param int $ttl Time-to-live (seconds) * @param callable $callback Callback that derives the new value + * @param integer $flags Bitfield of BagOStuff::READ_* constants [optional] * @return mixed The cached value if found or the result of $callback otherwise * @since 1.27 */ - final public function getWithSetCallback( $key, $ttl, $callback ) { - $value = $this->get( $key ); + final public function getWithSetCallback( $key, $ttl, $callback, $flags = 0 ) { + $value = $this->get( $key, $flags ); if ( $value === false ) { if ( !is_callable( $callback ) ) { -- 2.20.1