I'm still not so clear about the issue but I've found the reason.
As I stated in my question, the code I used in my view was like this:
<% cache @latest_episodes do %>
<% @latest_episodes.each do |t| %>
<% cache(t) do %>
<%= render 'common/slider_item', episode: t, lazy_owl: true %>
<% end %>
<% end %>
<% end %>
When I changed the instance variables to regular string keys and removed cache(t)
blocks, everything worked just fine.
I guess this issue occurred because Rails had to recreate the cache key on each request by processing the instance variables. But if it's the point, how come does Rails also have an auto-expiring mechanism? The statement I guess shows that it should always hit the database to create cache keys.
Any comment would be appreciated on this.