Skip to content

Commit

Permalink
Fix hash directive for cache removal
Browse files Browse the repository at this point in the history
  • Loading branch information
rslucena committed May 14, 2024
1 parent 1221a8f commit b5a6c0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/infrastructure/cache/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ async function set({ type, hash, vals, ttl, key }: setmode): Promise<string | nu
return action
}

async function del({ type, hash }: setmode): Promise<number> {
const keys = await client.keys(hash)
async function del({ hash }: setmode): Promise<number> {
const keys = await client.keys(`${hash}*`)
if (!keys.length) return 0
for (const key of keys) await client.del(key)
return keys.length
Expand Down

0 comments on commit b5a6c0e

Please sign in to comment.