Page caching - Leveraging Page Caching with Varnish in Rails Applications
Varnish can cache whole Rails pages in memory and serve them without touching the application, but only if Rails tells it which pages are safe to share. In this article, we’ll let Rails mark public pages with Cache-Control, configure Varnish to honour those headers without leaking one user’s page to another, and add PURGE/BAN invalidation.