Forum: Radiant CMS Re: tags, ActionView::Helpers, caching: trying to make a sho

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
kozy (Guest)
on 2007-04-24 20:42
(Received via mailing list)
that clears things up quite a bit, thanks.

It appears however you've missed my question about caching.

is it prossible to inject a small piece of evaluated code in the
for the shopping cart? Or do I need to disable caching completly for
I'd like to display the users shopping cart on every page. Is it
to disable the cache for users who have something in the shoppping cart?

If I want to continue using radiant for my site maybe I need to
it myself? Can I overwrite specific functions of the response_cache
to process the returned cache, injecting an evaluated snippet or such.
This might be very usefull for all kind of things.
keita (Guest)
on 2007-04-25 08:50
(Received via mailing list)

How about injecting the shopping cart by javascript?
I think this is not the best way, but easy.

1. add action "cart" into your controller. it returns like this:

cart = function() {$('cart').innerHTML = '... shopping cart ...';}
Event.observe(window, 'load', cart, false);

2. edit your template to load /shop/cart as javascript code and add
<div id="cart"></div>

You can use cached page and uncached shopping cart by this way.

I think the cache mechanism of radiant should keep simple way.

Keita Y.

2007/4/25, kozy <removed_email_address@domain.invalid>:
kozy (Guest)
on 2007-04-25 18:14
(Received via mailing list)
yes, 'kiss' for faster results, probably :)

I think it might be nice now I think about it again...make a pretty
spinner on loading.

Thanks people.
This topic is locked and can not be replied to.