one option is what we did on member
extension<http://github.com/Aissac/radiant-member-extension/blob/master/lib/site_controller_member_extensions.rb>.
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). This
probably doesn't solve your problem but could be a place to start :)


On Tue, Sep 15, 2009 at 8:19 PM, Sean Cribbs <seancri...@gmail.com> wrote:

> 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 wrote:
>
>> 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 <seancri...@gmail.com>
>> 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:   Radiant@radiantcms.org
>>>> Search: http://radiantcms.org/mailing-list/search/
>>>> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>>>>
>>>>
>>>>
>>>>
>>> _______________________________________________
>>> Radiant mailing list
>>> Post:   Radiant@radiantcms.org
>>> Search: http://radiantcms.org/mailing-list/search/
>>> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>>>
>>>
>>>
>> _______________________________________________
>> Radiant mailing list
>> Post:   Radiant@radiantcms.org
>> Search: http://radiantcms.org/mailing-list/search/
>> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>>
>>
>>
>
> _______________________________________________
> Radiant mailing list
> Post:   Radiant@radiantcms.org
> Search: http://radiantcms.org/mailing-list/search/
> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>
_______________________________________________
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