On 10/12/10 9:45 PM, Jim Gay wrote:
On Tue, Oct 12, 2010 at 10:16 PM, Wes Gamble<we...@att.net>  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: "#...@page.cache_expire_minutes} minutes" when @page.cache_expire_time != nil && @page.cache_expire_time.is_a?(Time) "Daily at #...@page.cache_expire_time.strftime("%H")}:#...@page.cache_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

Reply via email to