Merge "objectcache: add setMockTime() method to BagOStuff/WANObjectCache"
[lhc/web/wiklou.git] / includes / libs / objectcache / HashBagOStuff.php
index f8e3b17..ec66492 100644 (file)
@@ -44,7 +44,7 @@ class HashBagOStuff extends BagOStuff {
        function __construct( $params = [] ) {
                parent::__construct( $params );
 
-               $this->maxCacheKeys = isset( $params['maxKeys'] ) ? $params['maxKeys'] : INF;
+               $this->maxCacheKeys = $params['maxKeys'] ?? INF;
                if ( $this->maxCacheKeys <= 0 ) {
                        throw new InvalidArgumentException( '$maxKeys parameter must be above zero' );
                }
@@ -115,8 +115,4 @@ class HashBagOStuff extends BagOStuff {
        public function clear() {
                $this->bag = [];
        }
-
-       protected function getCurrentTime() {
-               return time();
-       }
 }