From 295c3fabecac621b6cdede2b0032dd66f38cc7fe Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Fri, 2 Feb 2018 12:19:53 +0000 Subject: [PATCH] vfs: fill and clean the cache immediately on startup --- vfs/cache.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vfs/cache.go b/vfs/cache.go index 4e3e3eff6..3ca68f712 100644 --- a/vfs/cache.go +++ b/vfs/cache.go @@ -387,6 +387,9 @@ func (c *cache) clean() { // // doesn't return until context is cancelled func (c *cache) cleaner(ctx context.Context) { + // Start cleaning the cache immediately + c.clean() + // Then every interval specified timer := time.NewTicker(c.opt.CachePollInterval) defer timer.Stop() for {