From bd125c4bef159329f621de317fd2d728e4246327 Mon Sep 17 00:00:00 2001 From: "Dr. Stefan Schimanski" Date: Tue, 21 Nov 2023 13:55:05 +0100 Subject: [PATCH] clients: log 'cached client', caching is the point, not being a client Signed-off-by: Dr. Stefan Schimanski --- internal/clients/clients.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/clients/clients.go b/internal/clients/clients.go index 06da577..3fc6573 100644 --- a/internal/clients/clients.go +++ b/internal/clients/clients.go @@ -231,7 +231,7 @@ func (c *Cache) Get(cr auth.Credentials, o ...GetOption) (client.Client, error) c.mx.RUnlock() if ok { - log.Debug("Used existing client", + log.Debug("Used existing cached client", "new-expiry", time.Now().Add(c.expiry), ) sn.expiration.Reset(c.expiry) @@ -284,7 +284,7 @@ func (c *Cache) Get(cr auth.Credentials, o ...GetOption) (client.Client, error) // another gorouting might have set the session. if sn, ok := c.active[id]; ok { c.mx.Unlock() - log.Debug("Used existing client", + log.Debug("Used existing cached client", "duration", time.Since(started), "new-expiry", newExpiry, ) @@ -321,7 +321,7 @@ func (c *Cache) Get(cr auth.Credentials, o ...GetOption) (client.Client, error) return nil, errors.New(errWaitForCacheSync) } - log.Debug("Created client", + log.Debug("Created cached client", "duration", time.Since(started), "new-expiry", newExpiry, )