Check http://learn.iis.net/page.aspx/154/iis-7-output-caching/ and http://blogs.iis.net/bills/archive/2007/05/02/iis7-output-caching-for-dynamic-content-dramatically-speed-up-your-asp-and-php-applications.aspx Basically you set the normal caching headers and configure IIS. If IIS decides it's cache-worthy it'll cache responses.
jarrold wrote: > Thanks for your reply Ken. > > Now I see, so that means that this caching only improves performance > for unique users. Is it possible to cache the generated html as a file > so that IIS will just serve the file instead of hitting the controller > again? So that even if 1000s of unique visitors hit the same url, > it'll still just hit the controller at most once per the duration set > (eg 10mins)? > > Thanks in advance, > Jarrold > > On Feb 26, 2:51 pm, Ken Egozi <[email protected]> wrote: > > These are two different caches. > > > > HttpRuntime.Cache is the server side cache - that caches data on the server. > > > > the CacheAttribute has to do with CACHE headers of the HttpResponse being > > sent to the browser - resulting with browsers and proxies caching the > > responses (or not) > > > > > > > > On Thu, Feb 26, 2009 at 5:12 AM, jarrold <[email protected]> wrote: > > > > > Hi guys, > > > > > I'm new here, was previously using the old Castle Forum... didn't know > > > this group existed. lol. > > > > > Anyways, I'm using the Cache Attribute to set up some caching for some > > > actions in a controller like this: > > > > > [Cache(HttpCacheability.Public, Duration = 86400, VaryByParams = > > > "CategoryId" )] > > > public void ProductPropertyValues() { ... } > > > > > The caching works as advertised but I want to create an action to > > > clear the cache manually using something like this: > > > > > public void ClearCache() > > > { > > > IDictionaryEnumerator CacheEnum = HttpRuntime.Cache.GetEnumerator > > > (); > > > > > while (CacheEnum.MoveNext()) > > > { > > > HttpRuntime.Cache.Remove(CacheEnum.Key.ToString()); > > > } > > > > > RenderText("Cache Cleared!"); > > > } > > > } > > > > > Right now this doesn't work as the cache only contains my Nvelocity > > > templates. Which cache is being used? > > > > > Also I'm from RoR background, and I know in RoR you can set up an > > > observer to expire the cache when models change. Is there anyway to > > > accomplish this in Monorail? > > > > > Looking forward to your expert advice, > > > Jarrold > > > > -- > > Ken > > Egozi.http://www.kenegozi.com/bloghttp://www.delver.comhttp://www.musicglue.comhttp://www.castleproject.orghttp://www.gotfriends.co.il --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en -~----------~----~----~----~------~----~------~--~---
