I added two service in Startup.cs as below,
services.AddScoped(typeof(ICacheManager), typeof(RedisCacheManager));
services.AddScoped(typeof(ICacheManager), typeof(InMemoryCacheManager));
However, I couldn't understand which one is used when I construct ICacheManager
in a Controller
For example, my HomeController as below:
private readonly ICacheManager _cacheManager;
public HomeController(ICacheManager cacheManager)
{
_cacheManager = cacheManager;
}
How can I set this?