From ac805d6838b835ab416dabf26d08e682e1fa3c38 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Thu, 9 May 2024 21:21:08 +0200 Subject: [PATCH] cache: cleanup debug logs --- internal/cache/backend.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/cache/backend.go b/internal/cache/backend.go index 24a44d750..63bb6f85f 100644 --- a/internal/cache/backend.go +++ b/internal/cache/backend.go @@ -181,7 +181,9 @@ func (b *Backend) Load(ctx context.Context, h backend.Handle, length int, offset inCache, err = b.loadFromCache(h, length, offset, consumer) if inCache { - debug.Log("error loading %v from cache: %v", h, err) + if err != nil { + debug.Log("error loading %v from cache: %v", h, err) + } return err }