0

I have implemented output caching in my project on two action methods named "XYZ" & "ABC". Please note controller is different for both of the methods.

If I will clear the output caching of action "XYZ" on any event, will it clear caching of another action method too? Or Do I need to clear caching for second method as well? I am clearing caching using below code:

 var requestContext = new System.Web.Routing.RequestContext(
    new HttpContextWrapper(System.Web.HttpContext.Current),
    new System.Web.Routing.RouteData());

    var Url = new UrlHelper(requestContext);
    var urlToRemove = Url.Action("XYZ", "controller");
    HttpResponse.RemoveOutputCacheItem(urlToRemove);

Please advice.

Ankita
  • 1,416
  • 4
  • 17
  • 42
  • If you specifically clear one method out why would that clear another method? – usr Jul 13 '15 at 11:56
  • Okay, that means I have to clear it all. Can you please tell me how output caching differ for different methods as object caching differ as per their key value? – Ankita Jul 13 '15 at 12:30

0 Answers0