moonpyk / mvcdonutcaching

ASP.NET MVC Extensible Donut Caching brings donut caching to ASP.NET MVC 3 and later. The code allows you to cache all of your page apart from one or more Html.Actions which can be executed every request. Perfect for user specific content.
https://github.com/moonpyk/mvcdonutcaching
MIT License
142 stars 50 forks source link

How to disable/clear caching in a controller action #44

Open dmikester1 opened 9 years ago

dmikester1 commented 9 years ago

I need to disable or clear the donut caching when a specific action occurs in my controller. How can I do this? I am using asp.net and MVC.

migig commented 9 years ago

Maybe add the caching to each action individually, and exclude that particular action?

StefanoChiodino commented 6 years ago

If you extend DonutOutputCacheAttribute you'll have access to the field OutputCacheManager, on which you can call RemoveItem and RemoveItems.