Skip to content

Commit

Permalink
invert cache liveness
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljguarino committed Oct 1, 2023
1 parent 0d38d21 commit bd6f174
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/client/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
2 changes: 1 addition & 1 deletion pkg/manifests/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit bd6f174

Please sign in to comment.