All threads / Caching with Etags Discussion

Ask A Question

Notifications

You’re not receiving notifications from this thread.

Caching with Etags Discussion

Dicussion for Caching with Etags

Can I use this with associations in views?
I have post with author and use fresh_when on post. If I change author will it render on post view old author or new one?

Hi, the documentation states it uses updated_at to set the last_modified in the response. So as long as your Post gets updated as the author gets updated, this should work.

Reply

Does it make sense using this for an index page if it has pagination?

Reply
Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 38,558+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.