fst*_*any 5 ruby caching ruby-on-rails
我正在使用以下内容缓存索引操作:
caches_action :index, :cache_path => Proc.new { |c| c.params }
expire_action :action => :index
Run Code Online (Sandbox Code Playgroud)
expire_action似乎只在没有任何参数的情况下使索引操作失效.如何使与索引相关的所有caches_action失效?
(这是一个Rails 2.3.5应用程序)
如果您不使用memcached,则可以将expire_fragment与正则表达式一起使用:
expire_fragment(Regexp.new("/yourpath/youraction\\."))
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
2417 次 |
最近记录: |