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 
Alexandre Jobin
  • 2,811
  • 4
  • 33
  • 43

1 Answers1

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());
jorgebg
  • 6,560
  • 1
  • 22
  • 31