On Aug 23, 2006, at 8:33 AM, fred wrote:> Yesterday I was told here that the ajax request can not be cached
> because rails cache mechanism only admit the http get request and ajax
> is always post. However there are lots of ajax in my  
> application,how to
> let the ajax requested actions/views be cached?
It requires a little bit more work, but you can specify that your  
AJAX queries be GET.
See:
	http://www.mnot.net/blog/2006/08/14/webizing_ajax
for a description of the javascript.
Within rails, you probably want the :method parameter, eg.
	form_remote_tag :method => ''get''
James.
-- 
James Stewart : Freelance Web Developer
Work : http://jystewart.net
Play : http://james.anthropiccollective.org
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---