mvcdonutcaching icon indicating copy to clipboard operation
mvcdonutcaching copied to clipboard

How to disable/clear caching in a controller action

Open dmikester1 opened this issue 10 years ago • 2 comments

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.

dmikester1 avatar Jun 08 '15 14:06 dmikester1

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

migig avatar Sep 25 '15 04:09 migig

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

StefanoChiodino avatar Mar 14 '18 12:03 StefanoChiodino