Is clearance of output caching clear all caching?

132 Views Asked by At

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.

0

There are 0 best solutions below