Rails - etags vs. page caching (file cache)

前端 未结 3 715
长发绾君心
长发绾君心 2021-02-06 03:06

What would be some advantages of using etags/stale?/fresh_when? instead of page caching (on a file cache)?

Apache automatically handles etags for static files, but even

3条回答
  •  天涯浪人
    2021-02-06 03:44

    Another use that occurred to me was that you could still process some information before letting Rails hand out the "304 Not Modified" header. Like if you want to record hits to a page.

提交回复
热议问题