views:

116

answers:

1

I'm caching an index action with the following:

caches_action :index, :cache_path => Proc.new { |c| c.params }

expire_action :action => :index

The expire_action seems to only expire the index action without any parameters. How can I expire all the caches_action related to index ?

(it is a Rails 2.3.5 application)

A: 

If you're not using memcached, you can use expire_fragment with a regexp:

expire_fragment(Regexp.new("/yourpath/youraction\\."))
tlianza