diff --git a/cache.go b/cache.go index eb12d16..7714f98 100644 --- a/cache.go +++ b/cache.go @@ -9,6 +9,7 @@ import ( "github.com/micro/go-micro/v2/logger" "github.com/micro/go-micro/v2/registry" + util "github.com/micro/go-micro/v2/util/registry" ) // Cache is the registry cache interface @@ -119,7 +120,7 @@ func (c *cache) get(service string) ([]*registry.Service, error) { // get cache ttl ttl := c.ttls[service] // make a copy - cp := registry.Copy(services) + cp := util.Copy(services) // got services && within ttl so return cache if c.isValid(cp, ttl) { @@ -152,7 +153,7 @@ func (c *cache) get(service string) ([]*registry.Service, error) { // cache results c.Lock() - c.set(service, registry.Copy(services)) + c.set(service, util.Copy(services)) c.Unlock() return services, nil