From e7d8bab5d981ebf633f87b3ecdeda7525b13820b Mon Sep 17 00:00:00 2001 From: IamCathal Date: Wed, 5 Aug 2020 17:56:11 +0100 Subject: [PATCH] Improved definition of DefaultEvery --- pkg/cache/memory.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/cache/memory.go b/pkg/cache/memory.go index 792a628a..c0e35c6c 100644 --- a/pkg/cache/memory.go +++ b/pkg/cache/memory.go @@ -22,7 +22,7 @@ import ( ) var ( - // Recycle the expired cache items in memory (in seconds) + // Timer for how often to recycle the expired cache items in memory (in seconds) DefaultEvery = 60 // 1 minute ) @@ -81,7 +81,7 @@ func (bc *MemoryCache) GetMulti(names []string) []interface{} { } // Put puts cache into memory. -// If lifespan is 0, it will never overwrite this value +// If lifespan is 0, it will never overwrite this value unless restarted func (bc *MemoryCache) Put(name string, value interface{}, lifespan time.Duration) error { bc.Lock() defer bc.Unlock()