From 537ce0a25829000a3b87e157ac9644bb193bbf27 Mon Sep 17 00:00:00 2001 From: yandd <982724342@qq.com> Date: Wed, 30 Oct 2019 14:01:51 +0800 Subject: [PATCH] fix rcache ttl --- cache.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cache.go b/cache.go index a6068ae..f8bee4a 100644 --- a/cache.go +++ b/cache.go @@ -81,7 +81,7 @@ func (c *cache) isValid(services []*registry.Service, ttl time.Time) bool { } // time since ttl is longer than timeout - if time.Since(ttl) > c.opts.TTL { + if time.Since(ttl) > 0 { return false }