Expire Output Cache ASP.Net MVC

Posted by Max Fraser on Stack Overflow See other posts from Stack Overflow or by Max Fraser
Published on 2008-12-18T03:40:29Z Indexed on 2010/04/27 14:13 UTC
Read the original article Hit count: 1012

I am using the standared outputcache tag in my MVC app which works great but I need to force it to be dumped at certain times. How do I achieve this? The page that gets cached is built from a very simple route {Controller}/{PageName} - so most pages are something like this: /Pages/About-Us

Here is the output cache tag that is at the top of my .aspx v iew page just to be clear:

<@ OutputCache Duration="100" VaryByParam="None" %>

So in another action on the same controller where content is updated I need to dump this cache, or even all of it - it's a very small app so not a big deal deal to dump all cached items.

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about asp.net-mvc