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 that part.

Would an acceptable method to add this to Radiant-handled Pages be to
override the set_cache_control filter in the SiteController via an
extension, or is there a cleaner way of handling this?

Rufo

On Tue, Sep 15, 2009 at 12:22 PM, Sean Cribbs <[email protected]> wrote:
> 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:
>>
>> 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 the
>> page, etc, whereas anonymous users will all see the same page content.
>>
>> I'm thinking it should be adequate to simply check the session or
>> their cookie to see if they're logged in, and if so bypass the cache -
>> otherwise normal Radiant cache behavior can apply.
>>
>> I took a look into this briefly a while back, but wasn't quite sure
>> what the right way to go about this was - any thoughts would be
>> appreciated.
>>
>> Rufo
>> _______________________________________________
>> Radiant mailing list
>> Post:   [email protected]
>> Search: http://radiantcms.org/mailing-list/search/
>> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>>
>>
>
> _______________________________________________
> Radiant mailing list
> Post:   [email protected]
> Search: http://radiantcms.org/mailing-list/search/
> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>
_______________________________________________
Radiant mailing list
Post:   [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to