X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Flibs%2Fobjectcache%2FCachedBagOStuff.php;h=c85a82ea010c2fb07e7d5cc035e1cc1c172350a7;hp=e70a51f93d42a376366952a763a4fe28ef76fef7;hb=6c9a2923fe1ee3a65cb027be5e781772f2b12fbd;hpb=7abf23c194b6fc87bcb3da2453747638cbea64c5 diff --git a/includes/libs/objectcache/CachedBagOStuff.php b/includes/libs/objectcache/CachedBagOStuff.php index e70a51f93d..c85a82ea01 100644 --- a/includes/libs/objectcache/CachedBagOStuff.php +++ b/includes/libs/objectcache/CachedBagOStuff.php @@ -42,6 +42,8 @@ class CachedBagOStuff extends HashBagOStuff { * @param array $params Parameters for HashBagOStuff */ function __construct( BagOStuff $backend, $params = [] ) { + unset( $params['reportDupes'] ); // useless here + parent::__construct( $params ); $this->backend = $backend; @@ -79,6 +81,22 @@ class CachedBagOStuff extends HashBagOStuff { $this->backend->setDebug( $bool ); } + public function deleteObjectsExpiringBefore( $date, $progressCallback = false ) { + parent::deleteObjectsExpiringBefore( $date, $progressCallback ); + return $this->backend->deleteObjectsExpiringBefore( $date, $progressCallback ); + } + + public function makeKey() { + return call_user_func_array( [ $this->backend, __FUNCTION__ ], func_get_args() ); + } + + public function makeGlobalKey() { + return call_user_func_array( [ $this->backend, __FUNCTION__ ], func_get_args() ); + } + + // These just call the backend (tested elsewhere) + // @codeCoverageIgnoreStart + public function lock( $key, $timeout = 6, $expiry = 6, $rclass = '' ) { return $this->backend->lock( $key, $timeout, $expiry, $rclass ); } @@ -87,21 +105,17 @@ class CachedBagOStuff extends HashBagOStuff { return $this->backend->unlock( $key ); } - public function deleteObjectsExpiringBefore( $date, $progressCallback = false ) { - parent::deleteObjectsExpiringBefore( $date, $progressCallback ); - return $this->backend->deleteObjectsExpiringBefore( $date, $progressCallback ); - } - public function getLastError() { return $this->backend->getLastError(); } public function clearLastError() { - $this->backend->clearLastError(); + return $this->backend->clearLastError(); } public function modifySimpleRelayEvent( array $event ) { return $this->backend->modifySimpleRelayEvent( $event ); } + // @codeCoverageIgnoreEnd }