objectcache: make adaptiveTTL() use getCurrentTime() for completeness
authorAaron Schulz <aschulz@wikimedia.org>
Mon, 27 Nov 2017 17:45:46 +0000 (09:45 -0800)
committerAaron Schulz <aschulz@wikimedia.org>
Mon, 27 Nov 2017 17:45:46 +0000 (09:45 -0800)
Change-Id: I5ba3c39ccaf412b0aaecd64d52ab15b2075bc76c

includes/libs/objectcache/WANObjectCache.php

index f5c561f..ae7f36c 100644 (file)
@@ -1558,7 +1558,7 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface {
                        return $minTTL; // no last-modified time provided
                }
 
-               $age = time() - $mtime;
+               $age = $this->getCurrentTime() - $mtime;
 
                return (int)min( $maxTTL, max( $minTTL, $factor * $age ) );
        }