-
Guys hello, could u tell, how to properly disconnect redis 6 in express? Does it make sense to close the connection in each request? What exactly method to use? And one more, if I use Prisma library where is said that
Maybe it doesn't make sense to make a disconnection of redis at all? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
In most cases, you'll want to create one global client and never close it (unless the process closes, which is done automatically) |
Beta Was this translation helpful? Give feedback.
-
Thanks, I thought so too. But one guy said that he made disconnections after each request and I decided to clarify it. He had a lot of requests and requests were connected and disconnected redis very often. It made me confused |
Beta Was this translation helpful? Give feedback.
In most cases, you'll want to create one global client and never close it (unless the process closes, which is done automatically)