Keeping references to processes in nextjs

Hey, im trying the t3 stack and i have a quetions about nextjs in general. So the issue is that on backend i spawn some processes that i need to keep the reference for. Currently i save it in the trpc context which is very handy for me. However this does have its limitations and probably is not even the intended usecase. For example in dev mode it seems that the context is refreshed when a page is newly compiled and the references to the processes are lost, in prod mode its works just fine. So I was wondering if there is a way to make the backend statefull. Thanks in advance
1 Reply
Sturlen
Sturlen10mo ago
It would be very helpful if you could some further explaination and code examples of what you're trying to do. Depending on your use case, you might need a cache such as Redis or a database to store your state
Want results from more Discord servers?
Add your server