I'm looking for some advice on page caching in Radiant 0.8.0, in
particular how to control caching on individual pages depending on their
content. For example, if I include the Polls extension on a page, the
page that includes the poll should not be cached, but I don't see an
obvious way of disabling caching on an individual page.

The Page model currently has a cache? method that is hard-coded to
return true, so it seems to me that modifying the Page model to allow
setting the cache value should then allow me to disable caching on a
particular page. So, for example, in the extension's tag definitions, I
could then do something like

  tag 'poll' do |tag|
    tag.locals.page.cache = false
    ...
  end

Is this a reasonable approach, or have I overlooked something that
already exists?

-- 
David Cato
o...@crunchyfrog.net

_______________________________________________
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