From dcdb271253d2516b780b88a7e6e5c5e0e8652b0d Mon Sep 17 00:00:00 2001 From: Matt Gleich Date: Wed, 4 Dec 2024 16:15:01 -0500 Subject: [PATCH] feat: update cache if there is no error explicitly Signed-off-by: Matt Gleich --- internal/cache/cache.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/cache/cache.go b/internal/cache/cache.go index 761e589..4f3986f 100644 --- a/internal/cache/cache.go +++ b/internal/cache/cache.go @@ -110,8 +110,8 @@ func (c *Cache[T]) StartPeriodicUpdate(updateFunc func() (T, error), interval ti } else { lumber.Error(err, "updating", c.name, "cache failed") } - continue + } else { + c.Update(data) } - c.Update(data) } }