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 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  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] 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 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


Re: [Radiant] Re: Re: [Radiant-Dev] [ANN] Styles 'n Scripts Extension

2008-05-20 Thread Rufo Sanchez
> is there any way to call js/css files from anywhere of the page/layout?
> suppose, i use one template and many subpages?
>  but i use different/extra css/js files on subpages (and also common), for
> example i will use accordion script on a subpage and putting this on
> template or on header snippet is nonsense
> so i am looking for a way to call these files from inside page/layout

The way I usually do this is to put a content part in my layout's
header called "head-meta" that appears in the header, e.g.

http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">

...other header stuff ...



Then you can just add a part to the page called (what else) head-meta
and add whatever page-specific Javascript, CSS, meta tags, etc. you
might want.

Hope this helps!

Rufo
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Ruby Gems Installation Issue

2008-04-19 Thread Rufo Sanchez
On Sat, Apr 19, 2008 at 8:28 PM, Tom Cloyd <[EMAIL PROTECTED]> wrote:

"locate" spewed out the files in
> "/var/lib/gems/1.8/doc/radiant-0.6.4/", of course. It also listed
> "/var/lib/gems/1.8/bin/radiant", so, I executed the
>
> radiant --database sqlite3 "/home/tom/Ruby projects -
> Toms/radiant-test-CMS"
>
> command I'd tried earlier, from within that dir, and once again got:
> bash: radiant: command not found
>

Tom,
Apologies if you know/tried this already, but sometimes it's the simple
things... What happens if you run the "radiant" command using the absolute
path, e.g.

/var/lib/gems/1.8/bin/radiant

...instead of switching to the /var/lib/gems/1.8/bin directory?

Most UNIX installs don't put the current directory in PATH for security
reasons, so while that may have been the radiant command you tried to
launch, the shell may not have found it.

If that works, you can add the /var/lib/gems/1.8/bin directory to your PATH,
and from that point on you should be good to go.

Hope this helps, and good luck with your Radiant adventures,
Rufo
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant