[Clarification] Better to open a persistent client or always to use resource #839
-
In a long running server, say a web client, is it better to call use and then pass my client into any dependencies, or is the intended use is that we generate a new client each time via mkRedisClient.use() each time I need it |
Beta Was this translation helpful? Give feedback.
Answered by
yisraelU
May 29, 2024
Replies: 1 comment
-
Definitely create one instance at the beginning of the application and pass it around. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
yisraelU
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Definitely create one instance at the beginning of the application and pass it around.
Since Redis4Cats wraps Lettuce , you can take a look at the documentation of how connections are maintained and kept alive