From bd6f1749bbe12a2ec0472b556ed40ff719c8dff1 Mon Sep 17 00:00:00 2001 From: michaeljguarino Date: Sat, 30 Sep 2023 21:49:08 -0400 Subject: [PATCH] invert cache liveness --- pkg/client/cache.go | 2 +- pkg/manifests/cache.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/client/cache.go b/pkg/client/cache.go index f1d46552..468412a6 100644 --- a/pkg/client/cache.go +++ b/pkg/client/cache.go @@ -51,5 +51,5 @@ func (c *ServiceCache) Wipe() { } func (l *cacheLine) live(dur time.Duration) bool { - return l.created.Before(time.Now().Add(-dur)) + return l.created.After(time.Now().Add(-dur)) } diff --git a/pkg/manifests/cache.go b/pkg/manifests/cache.go index 019e28c2..0ee60db5 100644 --- a/pkg/manifests/cache.go +++ b/pkg/manifests/cache.go @@ -67,7 +67,7 @@ func (c *ManifestCache) Wipe() { } func (l *cacheLine) live(dur time.Duration) bool { - return l.created.Before(time.Now().Add(-dur)) + return l.created.After(time.Now().Add(-dur)) } func (l *cacheLine) wipe() {