From 6fea4b97471a37224bb58dc0cc8fb3f2caf3445c Mon Sep 17 00:00:00 2001 From: Christian Richter Date: Wed, 12 Oct 2022 13:29:16 +0200 Subject: [PATCH] fix malformed uid string in getter Signed-off-by: Christian Richter --- pkg/storage/cache/cache.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkg/storage/cache/cache.go b/pkg/storage/cache/cache.go index 73332093dd7..e195d7684f4 100644 --- a/pkg/storage/cache/cache.go +++ b/pkg/storage/cache/cache.go @@ -198,7 +198,14 @@ func (cache cacheStore) List(opts ...microstore.ListOption) ([]string, error) { microstore.ListFrom(cache.database, cache.table), } o = append(o, opts...) - return cache.s.List(o...) + keys, err := cache.s.List(o...) + if err != nil { + return nil, err + } + for i, key := range keys { + keys[i] = strings.TrimPrefix(key, cache.table) + } + return keys, nil } // Delete deletes the given key on the configured database and table of the underlying store