Ruby on rails Rails片段缓存工作不正常
我看到了这段代码Ruby on rails Rails片段缓存工作不正常,ruby-on-rails,ruby,caching,ruby-on-rails-4,Ruby On Rails,Ruby,Caching,Ruby On Rails 4,我看到了这段代码 <% cache("students_cache") do %> <% @swimming_students.each do |swimming_student| %> <tr class="gradeX"> <td><%= link_to " #{swimming_student.full_name}", swimming_student %></td> <td&
<% cache("students_cache") do %>
<% @swimming_students.each do |swimming_student| %>
<tr class="gradeX">
<td><%= link_to " #{swimming_student.full_name}", swimming_student %></td>
<td><%= swimming_student.homephone %></td>
</tr>
<% end %>
<% end %>
结束
但是在我创建了一个新的学生之后,缓存没有更新
缺少某些内容?使用带字符串键的片段缓存时,应关闭缓存摘要:
<% cache("students_cache", skip_digest: true) do %>
有关更多详细信息,请参阅。使用带字符串键的片段缓存时,应关闭缓存摘要:
<% cache("students_cache", skip_digest: true) do %>
有关更多详细信息,请参阅。使用带字符串键的片段缓存时,应关闭缓存摘要:
<% cache("students_cache", skip_digest: true) do %>
有关更多详细信息,请参阅。使用带字符串键的片段缓存时,应关闭缓存摘要:
<% cache("students_cache", skip_digest: true) do %>
有关更多详细信息,请参阅。您在哪里更新
@swiming\u students
?@spickermann我必须更新@swiming\u students
?expire\u fragment(“students\u cache”)
不应该让cache过期吗?你在哪里更新@swiming\u students
?@spickermann我必须更新@swiming\u students
?expire\u fragment(“students\u cache”)
不应该让cache过期吗?你在哪里更新@swiming\u students
?@spickermann我必须更新@swiming\u students
?expire\u fragment(“students\u cache”)
不应该让cache过期吗?你在哪里更新@swiming\u students
?@spickermann我必须更新@swiming\u students
?expire\u片段(“学生缓存”)
不应该使缓存过期吗?