From 7e9d8c295108bacb26b81031650bba0c2483eabd Mon Sep 17 00:00:00 2001 From: britannic Date: Sun, 1 Nov 2020 07:46:25 -0800 Subject: [PATCH] Update cache.go --- handlers/cache.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/handlers/cache.go b/handlers/cache.go index 5a77d58b..2bd119e8 100644 --- a/handlers/cache.go +++ b/handlers/cache.go @@ -1,10 +1,11 @@ package handlers import ( - "github.com/statping/statping/utils" "net/url" "sync" "time" + + "github.com/statping/statping/utils" ) var CacheStorage Cacher @@ -92,7 +93,7 @@ func (s Storage) Get(key string) []byte { s.mu.Lock() defer s.mu.Unlock() item := s.items[key] - if item.Expired() { + if s.items[key].Expired() { CacheStorage.Delete(key) return nil }