aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2016-02-21 16:32:50 +0100
committerKasper Timm Hansen <kaspth@gmail.com>2016-02-21 16:41:27 +0100
commite93f0f0f133717f9b06b1eaefd3442bd0ff43985 (patch)
treef1471f99cd9c8a2996e74b904e4435405605753d
parent6dfcfef73b6ef4530bee2c97ad1605762591f520 (diff)
downloadrails-e93f0f0f133717f9b06b1eaefd3442bd0ff43985.tar.gz
rails-e93f0f0f133717f9b06b1eaefd3442bd0ff43985.tar.bz2
rails-e93f0f0f133717f9b06b1eaefd3442bd0ff43985.zip
[ci skip] Clarify collection caching went EXPLICIT.
Yo dawg, we so explicit if we were a music track, yo' iPhone's Music app would put an E next to it. *drops mic*
-rw-r--r--actionview/CHANGELOG.md13
1 files changed, 9 insertions, 4 deletions
diff --git a/actionview/CHANGELOG.md b/actionview/CHANGELOG.md
index c1aeb2a61f..bd7ce14e04 100644
--- a/actionview/CHANGELOG.md
+++ b/actionview/CHANGELOG.md
@@ -197,16 +197,18 @@
*Ulisses Almeida*
-* Collection rendering automatically caches and fetches multiple partials.
+* Collection rendering can cache and fetch multiple partials at once.
Collections rendered as:
```ruby
- <%= render @notifications %>
- <%= render partial: 'notifications/notification', collection: @notifications, as: :notification %>
+ <%= render partial: 'notifications/notification', collection: @notifications, as: :notification, cached: true %>
```
- will now read several partials from cache at once, if the template starts with a cache call:
+ will read several partials from cache at once. The templates in the collection
+ that haven't been cached already will automatically be written to cache. Works
+ great alongside individual template fragment caching. For instance if the
+ template the collection renders is cached like:
```ruby
# notifications/_notification.html.erb
@@ -215,6 +217,9 @@
<% end %>
```
+ Then any collection renders shares that cache when attempting to read multiple
+ ones at once.
+
*Kasper Timm Hansen*
* Fixed a dependency tracker bug that caused template dependencies not