How would I go about expiring a fragment cache after a period of time. I came across references to a timed_fragment_cache
gem, but it seems out-dated.
Using ActiveSupport::Cache::Store
, you should be able to do
<% cache(key, expires_in: 1.hour) do %> <!-- content --> <% end %>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With