Skip to content

Commit

Permalink
Refactor redis-stack Handler to use Promise.allSettled for set callba…
Browse files Browse the repository at this point in the history
…ck (#286)
  • Loading branch information
better-salmon authored Jan 26, 2024
1 parent 1d38d8d commit f3b30a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/small-windows-poke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@neshca/cache-handler': patch
---

Refactor `redis-stack` Handler to use `Promise.allSettled` for `set` callback.
2 changes: 1 addition & 1 deletion packages/cache-handler/src/handlers/redis-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export default async function createCache<T extends RedisClientType>({
commands.push(client.expire(options, keyPrefix + key, evictionDelay));
}

await Promise.all(commands);
await Promise.allSettled(commands);
},
async getRevalidatedTags() {
assertClientIsReady();
Expand Down

0 comments on commit f3b30a5

Please sign in to comment.