Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Abort OutputCache duration programmatically in asp.net mvc

I'm using the OutputCache attribute to cache my action's html output at the server-side.

Fine, it works, but now I have a situation where the content changes rarely, but when it does, it's critical for the user to see the new data the very next request.

So, is there a way to abort the page cache duration programmatically?

like image 915
andrecarlucci Avatar asked Jul 29 '09 14:07

andrecarlucci


1 Answers

Yes, it is possible using HttpResponse.RemoveOutputCacheItem Method. Check this question:

  • SO - How to programmatically clear outputcache for controller action method
like image 139
eu-ge-ne Avatar answered Sep 25 '22 23:09

eu-ge-ne