On Tue, Jun 30, 2009 at 11:20 PM, Mohit Sindhwani<t...@onghu.com> wrote:
> Hi, just a quick question - how do I increase the page caching from 5
> minutes to something much more?
> My site has mostly static content other than the use of the comments
> extension which itself clears the cache when the page changes.  I think it
> would make a great difference to the performance to set the cache time out
> to a much larger value.
> My understanding is that I should add a line to
> MYRADIANTAPP/config/environment.rb where it says:
>   # Response Caching Defaults
>   ResponseCache.defaults[:directory] =
> ActionController::Base.page_cache_directory
>   ResponseCache.defaults[:logger]    = ActionController::Base.logger

i can't recall exactly how it worked in 0.7 (search the radiant source
for "5.minutes" and you'll find the code that controls it) but in 0.8
there is a method on SiteController called cache_timeout that you use
to set the timeout to whatever you like. i stuck
`SiteController.cache_timeout = 60.minutes` in environment.rb fired up
a rails console, ran SiteController.cache_timeout.value and sure
enough i get 3600 back.
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to