Created
March 6, 2009 22:34
-
-
Save cbilson/75103 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Web; | |
| using Castle.MonoRail.Framework; | |
| using System.Collections; | |
| using System.Reflection; | |
| using Newtonsoft.Json; | |
| using System.IO; | |
| using System.Text; | |
| namespace Ris.Fx.Web.Controllers { | |
| public class NoCacheFilter : Filter { | |
| protected override bool OnBeforeAction(IEngineContext context, IController controller, IControllerContext controllerContext) { | |
| context.Response.CachePolicy.SetCacheability(HttpCacheability.NoCache); | |
| return base.OnBeforeAction(context, controller, controllerContext); | |
| } | |
| } | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Web; | |
| using Castle.MonoRail.Framework; | |
| using System.Collections; | |
| using System.Reflection; | |
| using Newtonsoft.Json; | |
| using System.IO; | |
| using System.Text; | |
| namespace Ris.Fx.Web.Controllers | |
| { | |
| [Rescue("RisRescue"), | |
| Layout("RISPage"), | |
| Filter(ExecuteWhen.BeforeAction, typeof(AppHealthFilter)), | |
| Filter(ExecuteWhen.BeforeAction, typeof(NoCacheFilter)) | |
| /* or: | |
| Cache(HttpCacheability.NoCache) */] | |
| public class BaseController : SmartDispatcherController | |
| { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment