~/talk

The Ghosts of Action View Cache

Talkat RailsConf 2025 · 2025-07-08..07-10· [ruby-on-rails]
links:none on file
slides:none on file

Caches rendered HTML instead of relations, so switching to Action View fragment caching fixes a bug where an ActiveRecord relation was stored in Rails.cache and prevents that class of errors. Cache keys come from action_view_digestor by hex‑digesting template source plus its dependency tree parsed by the ERB tracker (regex with an ERB‑comment fallback). A utility, action_view_precompiler, uses Ruby parsers (ripper and prism render parser) to precompile templates at boot, lowering memory and enabling a CLI that found ~5% dead view templates in one app.

AI-written summary · about

  1. 0:00Introduction
  2. 1:06Rails upgrade ghost story
  3. 2:30Action View fragment caching
  4. 3:57Action View cache keys
  5. 6:43Memory issues with Action View
  6. 8:09Rails server worker forking
  7. 10:58Action View pre-compiler
  8. 13:25Template pre-compilation benefits
  9. 14:28Dead view templates
  10. 17:40Mark-sweep for dead code
  11. 20:49Action View improvements
  12. 22:56Upstreaming pre-compiler
  13. 24:00Rails building blocks
  14. 24:42Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.