Daniel Waite
2008-May-20 19:20 UTC
*Don''t* cache *anything*. Or, why is Ajax loved so much?
Every search I''ve done on *not caching* something in Rails inevitably turns up with "so you want to cache?". No! I''ve got a view that is asking @cart.empty? and answering true, when I expect it to be false. Calling out that cart in console yields false, as it should. Adding and removing from the cart is done via Ajax, and the returned response populates the view with the cart''s items. Refreshing said page then tells me the cart is empty. Is this a caching issue? I haven''t explicitly setup any caching. I''m running in development with Thin (though I tried Mongrel with the same results) on Rails 2.0.2. Any ideas? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
Daniel Waite
2008-May-20 19:34 UTC
Re: *Don''t* cache *anything*. Or, why is Ajax loved so much?
Oh, also, logger.debug messages in the controller are not displayed unless an Ajax request is made. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
I''ve seen the latter happen, but only in the console. The debug messages (logger.debug) are written to the development.log every time. I''ve been using NetBeans (6.0) and in certain circumstances it requires the log to be closed and re-opened to see the updates to the log. Have you been checking/tailing the log or just checking the console? On May 20, 3:34 pm, Daniel Waite <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Oh, also, logger.debug messages in the controller are not displayed > unless an Ajax request is made. > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---