Re: [Radiant] Per-request caching?

2009-09-15 Thread Cristian Duma
one option is what we did on member extension. You need to add a filter to the site_controller that tells it to not cache specific pages (in our case the pages that need member registration). Thi

Re: [Radiant] Per-request caching?

2009-09-15 Thread Sean Cribbs
Radiant::Cache doesn't discriminate between users who are logged in or not. IMO it would be best to either: 1) Turn off all caching by removing the Radiant::Cache middleware. 2) Load your user-specific stuff into the page using Ajax, allowing the caching to still occur. Sean Rufo Sanchez wr

Re: [Radiant] Per-request caching?

2009-09-15 Thread Rufo Sanchez
Gah - I *knew* I was leaving something out of my explanation. :-) The main point is that there are Radius tags that will display certain information on *all* pages on the system that shouldn't be cached when logged in - the caching isn't limited to just our extension's controllers, I can handle th

Re: [Radiant] Per-request caching?

2009-09-15 Thread Sean Cribbs
Rufo, The key is adding the correct caching-related headers that will be detected by Rack::Cache. You can do this automatically in your controllers using "expires_in", "expires_now", and the like. I suggest checking out the ActionController API for more details. Sean Rufo Sanchez wrote:

[Radiant] Per-request caching?

2009-09-15 Thread Rufo Sanchez
Anyone have any pointers toward the best way of implementing per-request caching in Radiant 0.8.x? The basic idea is that we're writing a bunch of extensions to handle a membership database, user login, etc. - logged-in users may have different options appear, will have their name in a corner of t