Caching js

Hi all,

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

-K

Keynan P. 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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs