I am using rails 3 with cache_digests and I have a fragment cache in a template:
<% cache [I18n.locale,'city-list'] do %>
...
<% end %>
In an observer I want to expire that cache for all locales like this:
I18n.available_locales.each do |loc|
ActionController::Base.new.expire_fragment("#{loc}/city-list")
end
But obviously this won't work, because I am missing the digest of that fragment in the expire call.
Is there a clean way to expire this cache?