I'd use the memoize on a general monolith using something express but with Next the micro server drops the connection variable and for me, i didn't go deep into figuring out why the connection was being left on idle and hence the destroy solution came into play.
No it's not that slow but obviously if you have a million people connecting at once to your service, that'd be bad, but since TillWhen's max usage is 15-20 people at any given time so it works for now but the solution can be improved, the only reason it doesn't kill the db in my case is because the functions are pretty concise and I don't make more than 1 query or 1 insertion/updation query per request, so it's pretty quick in my case but as I said,
will need better connection cache handling in case of very heavy usage
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I'd use the memoize on a general monolith using something express but with Next the micro server drops the connection variable and for me, i didn't go deep into figuring out why the connection was being left on idle and hence the destroy solution came into play.
No it's not that slow but obviously if you have a million people connecting at once to your service, that'd be bad, but since TillWhen's max usage is 15-20 people at any given time so it works for now but the solution can be improved, the only reason it doesn't kill the db in my case is because the functions are pretty concise and I don't make more than 1 query or 1 insertion/updation query per request, so it's pretty quick in my case but as I said,
will need better connection cache handling in case of very heavy usage