Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fix cache issue when different partials use the same collection | Roque Pinel | 2015-06-28 | 1 | -1/+1 |
| | | | | | | | | | Adds the `virtual_path` option to `cache_fragment_name` so it can be provided when needed. That allows `cache_collection_render` to get the appropriate cache key with the digest generated based on the template and prevent collision with other templates that cache the same collection. | ||||
* | spelling fix [ci skip] | karanarora | 2015-05-19 | 1 | -1/+1 |
| | |||||
* | Collections automatically cache and fetch partials. | Kasper Timm Hansen | 2015-02-21 | 1 | -2/+15 |
| | | | | | | | | | | | | | | | | | | | | | | | 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 %> ``` | ||||
* | Merge multi_fetch_fragments. | Kasper Timm Hansen | 2015-02-20 | 1 | -0/+57 |
Makes caching a collection of template partials faster using `read_multi` on the Rails cache store. Some caching implementations have optimized `read_multi` so we don't have to check in the cache store for every template. |