Merge "ESLint ecmaVersion setting is not needed if env is es6"
[lhc/web/wiklou.git] / includes / libs / objectcache / HashBagOStuff.php
index 6d583da..f8e3b17 100644 (file)
@@ -52,7 +52,7 @@ class HashBagOStuff extends BagOStuff {
 
        protected function expire( $key ) {
                $et = $this->bag[$key][self::KEY_EXP];
-               if ( $et == self::TTL_INDEFINITE || $et > time() ) {
+               if ( $et == self::TTL_INDEFINITE || $et > $this->getCurrentTime() ) {
                        return false;
                }
 
@@ -115,4 +115,8 @@ class HashBagOStuff extends BagOStuff {
        public function clear() {
                $this->bag = [];
        }
+
+       protected function getCurrentTime() {
+               return time();
+       }
 }