mvc-mini-profiler with OutputCacheAttribute
Asked Answered
B

1

11

im using mvc-mini-profiler on a test site. When i put an OutputCacheAttribute on my action 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 
Betterment answered 25/7, 2011 at 23:26 Comment(0)
G
1

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());
Groff answered 22/5, 2013 at 20:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.