Asp.net – When is it necessary to call services.AddMemoryCache()?
I am writing some middleware that would benefit from a memory cache. So I'm using dependency injection to provide an IMemoryCache instance. public async Task Invoke(HttpContext context, UserManager<ApplicationUser> userManager, IMemoryCache cache) { // Access cache here... } This seems to…