开发者

How to expire a caches_action with a cache_path?

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开发者_Python百科 parameters. How can I expire all the caches_action related to index ?

(it is a Rails 2.3.5 application)


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

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜