aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/fixtures/collection_cache
Commit message (Collapse)AuthorAgeFilesLines
* Make collection caching explicit.Kasper Timm Hansen2016-02-201-1/+1
| | | | | | | | | | | | Having collection caching that wraps templates and automatically tries to infer if they are cachable proved to be too much of a hassle. We'd rather have it be something you explicitly turn on. This removes much of the code and docs to explain the previous automatic behavior. This change also removes scoped cache keys and passing cache_options.
* Collections automatically cache and fetch partials.Kasper Timm Hansen2015-02-211-0/+1
Collections can take advantage of `multi_read` if they render one template and their partials begin with a cache call. The cache call must correspond to either what the collections elements are rendered as, or match the inferred name of the partial. So with a notifications/_notification.html.erb template like: ```ruby <% cache notification %> <%# ... %> <% end %> ``` A collection would be able to use `multi_read` if rendered like: ```ruby <%= render @notifications %> <%= render partial: 'notifications/notification', collection: @notifications, as: :notification %> ```