search for: fresh_when

Displaying 3 results from an estimated 3 matches for "fresh_when".

2012 Oct 02
4
Rails Default ETag Generation
...w does Rails generate ETags by default? I''ve got config.action_controller. perform_caching set to true in production so that I can use page-level caching in a few specific places, but it seems that Rails is automatically setting ETags on *all* responses even though I''m not using fresh_when or the stale? helpers in any of my actions. How is Rails deciding to do this and how do I disable it without killing page caching? -- 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...
2010 Oct 04
4
http caching a dynamic page
...view I do call another method favorites_count which collects the posts''s favorites count from memcache and this favorite keeps changing. This is a simplication of course, there are a few fields that do change. Now If I were to implement some sort of http caching then I would need to do a fresh_when or stale? in my controller method (show), which would essentially not render the views and hence the updated favorites count, unless I use a etag that encompassed the favorite count and other dynamic fields, in which case it kinda defeats the purpose because those fields change regularly. How do I...
2012 May 11
14
What is the point of using :format in routes?
Today I had a strange behavior that made me suspect of jQuery at first, but then it happened that I''ve faced two gotchas, one from CoffeeScript and one from Rails itself. I have something like this: routes.rb post ''/fields/:id.:format'' => ''fields#show'', as: :field, constraints: {id: /\d+/} post ''/fields/remove/:id''