← Graph

Fragment Caching

concept 6 connections

Rails view-level cache that stores rendered fragments keyed on a record. In the talk, wrapping each product row in a cache block (with touch: true on the reviews association so the parent product's cache key changes) drops render time dramatically. Caveats: the first render is slower because the cache must be written; cache keys must stay simple — overly complex keys can cost more to compute than the render they save.

category
pattern
about
Fragment Caching concept
Primary caching technique demonstrated.
about
Fragment Caching concept
Complements fragment caching by avoiding recomputation.
about
Fragment Caching concept
Directly about fragment cache key invalidation.
Answer framed around fragment-caching idea.
about
Fragment Caching concept
Discusses scaling of caching strategies.
about
Fragment Caching concept
Contrasts query optimization with view-layer caching.

Provenance

Read by
5 extractions