Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法告诉 Rails 3 缓存给定控制器中的所有页面,而不必在调用时将它们全部列出caches_page?我试过caches_page :all了,但它不起作用。
caches_page
caches_page :all
一种实现的错误,但我刚刚尝试过,它适用于 Rails 3.0.6:
caches_page :except => []
你总是可以做一些hack,比如:
(YourController.public_instance_methods - ApplicationController.public_instance_methods).each do |x| caches_page x.to_sym end