Fragment caching inside Turbo Frames (fast lists)

12232
0

Hotwire doesn’t replace caching—it makes it more valuable because you’re sending HTML frequently. I use fragment caching inside list partials and keep cache keys stable with cache blocks. The pattern is: cache each row by record, and cache the list wrapper by collection + page params. When Turbo Streams append/prepend new rows, those rows still benefit from per-record caches. This keeps server load low even with frequent updates. The gotcha is making sure you don’t cache user-specific content globally; if a row renders differently per user, include the user in the cache key or avoid caching that part. Used correctly, fragment caching makes Turbo UIs feel instant at scale.