Skip to content

Commit

Permalink
fix: pass redis object to redis create client in Persistor
Browse files Browse the repository at this point in the history
  • Loading branch information
Juan Pablo Vargas Martinez authored and Juan Pablo Vargas Martinez committed Dec 17, 2024
1 parent a87cbb7 commit 817cee6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/fresh-pugs-cheer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@sebspark/promise-cache": patch
---

fix, add redis object to redis create client setup
5 changes: 4 additions & 1 deletion packages/promise-cache/src/persistor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,11 @@ export class Persistor {
try {
await new Promise((resolve, reject) => {
this.client = CACHE_CLIENT({
...this.redis,
url: this.redis?.url,
username: this.redis?.username,
password: this.redis?.password,
socket: {
...this.redis?.socket,
reconnectStrategy: (retries, cause) => {
console.error(cause)
return 1000 * 2 ** retries
Expand Down

0 comments on commit 817cee6

Please sign in to comment.