Skip to content

Commit e93f0f0

Browse files
committed
[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*
1 parent 6dfcfef commit e93f0f0

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

actionview/CHANGELOG.md

+9-4
Original file line numberDiff line numberDiff line change
@@ -197,16 +197,18 @@
197197
198198
*Ulisses Almeida*
199199
200-
* Collection rendering automatically caches and fetches multiple partials.
200+
* Collection rendering can cache and fetch multiple partials at once.
201201
202202
Collections rendered as:
203203
204204
```ruby
205-
<%= render @notifications %>
206-
<%= render partial: 'notifications/notification', collection: @notifications, as: :notification %>
205+
<%= render partial: 'notifications/notification', collection: @notifications, as: :notification, cached: true %>
207206
```
208207
209-
will now read several partials from cache at once, if the template starts with a cache call:
208+
will read several partials from cache at once. The templates in the collection
209+
that haven't been cached already will automatically be written to cache. Works
210+
great alongside individual template fragment caching. For instance if the
211+
template the collection renders is cached like:
210212
211213
```ruby
212214
# notifications/_notification.html.erb
@@ -215,6 +217,9 @@
215217
<% end %>
216218
```
217219
220+
Then any collection renders shares that cache when attempting to read multiple
221+
ones at once.
222+
218223
*Kasper Timm Hansen*
219224
220225
* Fixed a dependency tracker bug that caused template dependencies not

0 commit comments

Comments
 (0)