diff options
Diffstat (limited to 'cache/filecache/filecache.go')
-rw-r--r-- | cache/filecache/filecache.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cache/filecache/filecache.go b/cache/filecache/filecache.go index 3104d8ac6..63d939ef6 100644 --- a/cache/filecache/filecache.go +++ b/cache/filecache/filecache.go @@ -24,7 +24,6 @@ import ( "sync" "time" - "github.com/gohugoio/hugo/common/htime" "github.com/gohugoio/hugo/common/hugio" "github.com/gohugoio/hugo/helpers" @@ -296,7 +295,10 @@ func (c *Cache) isExpired(modTime time.Time) bool { if c.maxAge < 0 { return false } - return c.maxAge == 0 || htime.Since(modTime) > c.maxAge + + // Note the use of time.Since here. + // We cannot use Hugo's global Clock for this. + return c.maxAge == 0 || time.Since(modTime) > c.maxAge } // For testing |