If you want to cache an action, based on all the query parameters (or say on nearly all of them), you can do:
caches_action :my_action, :cache_path => Proc.new { |c| c.params }
Or, maybe you want all but some params that you just use for Analytics (but that have no bearing on the records you're fetching):
caches_action :my_action, :cache_path => Proc.new { |c| c.params.delete_if { |k,v| k.starts_with?('utm_') } }
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…