dennismonsewicz
dennismonsewicz

Reputation: 25552

Rails: Expire fragment that has key generated with array

If I am generating a cache block like so:

<% cache ['v1', current_user, 'info'] do %>
  Info HEre
<% end %>

How do I go about expiring the fragment?

Upvotes: 1

Views: 215

Answers (1)

zolter
zolter

Reputation: 7160

You need write this line of code in all actions where you edit this fragment:

expire_fragment(['v1', current_user, 'info'])

Upvotes: 1

Related Questions