From 0290974f5c8d3a15eda41a440f45ea6165cc7d31 Mon Sep 17 00:00:00 2001 From: Giovani Sanches Date: Wed, 21 Jun 2023 15:57:19 -0300 Subject: [PATCH] =?UTF-8?q?fix(cache):=20Ajuste=20para=20deletar=20v=C3=A1?= =?UTF-8?q?rias=20chaves=20sem=20adicionar=20nome=20do=20microsservi=C3=A7?= =?UTF-8?q?o=20no=20inicio=20da=20chave?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cache/redis.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cache/redis.go b/cache/redis.go index 03c97a9..cf3301c 100644 --- a/cache/redis.go +++ b/cache/redis.go @@ -105,6 +105,15 @@ func (r *Redis) DelMany(keys []string) error { return nil } +// DelManyWithoutMSName delete many keys without building the key with microsservice name. +func (r *Redis) DelManyWithoutMSName(keys []string) error { + _, err := r.Client.Del(keys...).Result() + if err != nil { + return err + } + return nil +} + // DelManyFormattedKeys remove várias chaves já formatadas com o nome do serviço func (r *Redis) DelManyFormattedKeys(keys []string) error {