Rubyflow iconRubyflowOct 21, 2026

Seven layers of cache in a Rails app, from the browser to Russian doll

This post walks through the seven places a request can be answered before it reaches Postgres: browser cache (expires_in, fresh_when), Varnish, Nginx proxy cache, action caching, Russian doll fragments in ERB and jbuilder, Rails.cache on Memcached or Solid Cache, and an object cache on Redis. Each layer comes with its

Share this story

Send the public story page.

Keep reading in the app

Open the app view to save this story, compare related coverage, and continue from the same source.

Open in app