Ruby Forum Ruby on Rails > Caching js

Posted by Keynan Pratt (keynan)
on 06.04.2008 09:42
Hi all,

I want to cache the results of a rjs file as a fragment.
Any one know how?

-K
Posted by Keynan Pratt (keynan)
on 07.04.2008 00:23
...
Posted by Mike Nicholaides (nicholaides)
on 12.04.2008 23:33
Keynan Pratt wrote:
> ...

Of course, you can put:

cache do
 #...
end

around the call to render the rjs.

If the rjs template is called implicitly, you can just make it explicit:

cache do
 render :rjs #or whatever you call to render the template
end


Hope that's helpful