Render partial from cache substantially faster.

For example we have a view and a partial view named index.html.erb and _todo.html.erb.


<%= render partial: 'todo', collection: @todos, cached: true %>

When cached: true present, Rails will use read_multi to the cache store instead of reading from it every partial.


<% cache todo do %>
  <%= %>
<% end %>
Alexander M about 6 years ago
This website uses short-lived cookies to improve usability.
Accept or learn more