I have an ActionFilter
that does logging. I want this to log requests and parameters that come in to the server. This works fine. However when I add OutputCaching, this will only log the first request and no others.
I even tried creating an ActionFilter that behaves as such:
public class OutputCacheLoggingFilterAttribute : OutputCacheAttribute
{
public override void OnActionExecuting(ActionExecutingContext filterContext)
{
//Do my stuff
base.OnActionExecuting(filterContext);
}
}
I figured if I inherited from the outputcache that it would HAVE to run my code before it would get to the base call. Yet I was proven wrong and somehow my code will only execute once.