On Wed, Oct 13, 2010 at 1:15 PM, Wes Gamble <[email protected]> wrote: > On 10/12/10 9:45 PM, Jim Gay wrote: >> On Tue, Oct 12, 2010 at 10:16 PM, Wes Gamble<[email protected]> wrote: >>> >>> All, >>> >>> Is there a way to keep a specific page from being cached by Radiant? >>> >>> Thanks, >>> Wes >>> >> You could make a custom page class and turn it off. >> >> class NoCachePage< Page >> def cache >> false >> end >> end >> >> You could also take a look at >> http://ext.radiantcms.org/extensions/123-page-options > > The page-options extension appears to no longer be compatible with Radiant > (it was written at Radiant 0.7), per: > > def cache_setting > �...@page = Page.find(self.id) > case true > when @page.cache_expire_minutes == 0 && @page.cache_expire_time == > nil: "Default" > when @page.cache_expire_minutes == -1: "No Caching" > when @page.cache_expire_minutes == 1: "1 minute" > when @page.cache_expire_minutes > 1: "#[email protected]_expire_minutes} > minutes" > when @page.cache_expire_time != nil && > @page.cache_expire_time.is_a?(Time) > "Daily at > #[email protected]_expire_time.strftime("%H")}:#[email protected]_expire_time.strftime("%M")}" > else "Not set" > end > end > > "cache_expire_minutes" and "cache_expire_time" are no longer page > attributes, and as far as I can tell, all of the caching is not being > managed through HTTP response headers, is that correct? > > Wes >
Caching is handled via HTTP headers and RackCache, but the page_options extension adds fields to each page to control this. I've not used it, so perhaps others can jump in here. -- Jim Gay Saturn Flyer LLC http://www.saturnflyer.com 571-403-0338
