Answer the question
In order to leave comments, you need to log in
How to start Redis server automatically in ASP NET CORE?
I use caching with Redis. But for it to work, you need to run the Redis server itself. Is it possible to launch it automatically when starting an ASP NET Core web application?
Or it assumes that at me the server will be started for example by other machine?
Answer the question
In order to leave comments, you need to log in
If you are using Redis as a cache for a distributed system, then it must be on a different machine, yes.
But if you have only 1 instance of your application, then you don’t really need Redis at all, because there is already RAM in the same process.
second option. infrastructure setup can be done in different ways: Docker, ansible, chef, terraform, k8s.... in general, 100500 different options. But the application code definitely has no right to be responsible for this.
In the solution, add commands for the PreBuild step
for example net start redis
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question