public string Get() { // Here, in 1.1 it shows us the name of the type. This defaults to 'Microsoft.AspNetCore.ResponseCaching.Internal.MemoryResponseCache'. // This comes from the call to AddResponseCaching in ConfigureServices, but is overridden by own own implementation // if we provide one. var responseCacheType = _responseCache.GetType().ToString(); return($"ResponseCache is of type '{responseCacheType}'"); }
public string Get() { // Here, in 2.0 it blows up creating the instance of this controller // - because there is no implementation of ICacheResponse registered // - and if there was, the response caching middleware doesn't use it anyway. // if we provide our own implementation, it's name will come through here, but // since the constructor has been removed from the middleware, it isn't used. var responseCacheType = _responseCache.GetType().ToString(); return($"ResponseCache is of type '{responseCacheType}'"); }