I have a page that has controls that are output caches (partial output caching). These are setup like this:
[PartialCaching(86400, null, null, "campaign.whatwhere", true)]
public partial class controls_LatestEnquiriesListCached : System.Web.UI.UserControl
{
...
With
public override string GetVaryByCustomString(HttpContext context, string custom)
{
if (custom == "campaign.whatwhere")
{
return (CampaignManager.CurrentCampaign.DefaultWorkTypeId ?? 0).ToString() + (CampaignManager.CurrentCampaign.DefaultEnquiryAreaId ?? 0).ToString();
}
return base.GetVaryByCustomString(context, custom);
}
In Global.asax
How can I setup so I can clear this output cache on a specific page?
Is it possible to setup like MyPageWithCachedControl.aspx?ClearCache=true???
You can create an aspx page that does nothing but clears cache. You can take the querystring parameter and have it delete by cache key.
Or you can try to find and ASP.NET cache manager.