Using StackExchange.Redis in a ASP.NET Core Controller : <p>I'd like to use Redis features such as bitfields and hashfields from an MVC controller. I understand there's <a href="https://docs.microsoft.com/en-us/aspnet/core/performance/caching/distributed" rel="noreferrer">built in caching support</a> in ASP.NET core but this only supports basic GET and SET commands, not the commands that I need in my application. I know how to use StackExchange.Redis from a normal (eg. console) application, but I'm not sure how to set it up in an ASP site.</p>

<p>Where should I put all the connection initialisation code so that I can have access to it afterwards from a controller? Is this something I would use dependency injection for?</p>
