mvc-mini-profiler with OutputCacheAttribute
im using mvc-mini-profiler on a test site. When i put an OutputCacheAttribute on my act开发者_JAVA技巧ion method, the profiler is not executed and always return the last value that he had before the cache.
is there a way to tell mvc-mini-profiler that the result come from the cache so it can update his state? Maybe on the client site, we could see this kind of information:
http://localhost/Home (from cache) 2.1ms, +0.5ms
Applying output caching to a controller action also caches the profiler results. When OutputCache is applied to a controller most of the ASP.NET MVC pipeline is not executed.
You could add the date-time information of when the page was generated to the profiler, something like:
profiler.Step("Generated: " + DateTime.Now.ToString());
精彩评论