1

Possible Duplicate:
Clearing Page Cache in ASP.NET

I need to cache a website pretty heavily, but if the owners make a change via the CMS, they'd like to see it immediately. Is there a way to put a button in the CMS to clear the outputcache globally, or for a specific set of parameters ?

I'd like to avoid carrying an extra cachebust parameter around and injecting it into every controller action, but I'm not sure I see another way.

EDIT: I'd already look into How to programmatically clear outputcache for controller action method but the var-by-parameter issues make this impractical to clear down the full (or at least much of) the cache. The situation is that if the CMS user changes the status or details of a product we need to fix up product detail pages, category pages, other pages where the product may be promoted etc...probably easier / safer just to clear down the server cache totally.

Community
  • 1
  • 1
Andiih
  • 12,285
  • 10
  • 57
  • 88
  • http://stackoverflow.com/questions/1167890/how-to-programmatically-clear-outputcache-for-controller-action-method – CD.. Mar 23 '11 at 21:28
  • I read that before posting this - sorry - should have referenced it - I'll edit the question. – Andiih Mar 24 '11 at 08:19
  • 1
    Did you see this SO (Kevin's answer)? http://stackoverflow.com/questions/11585/clearing-page-cache-in-asp-net – CD.. Mar 24 '11 at 08:25
  • oh no I hadn't! That's exactly what I need: make that an answer and I'll accept it :-) – Andiih Mar 24 '11 at 08:50
  • See Kevin's answer on this SO: [Clearing Page Cache in ASP.NET](http://stackoverflow.com/questions/11585/clearing-page-cache-in-asp-net) – CD.. Mar 23 '11 at 21:18

0 Answers0