Caches_page: all

Is it possible to specify Rails 3 to cache all pages in a given controller without having to list them all when called caches_page? I tried caches_page :all, but it does not work.

+5
source share
2 answers

Kind of error, but I just tried and it works on Rails 3.0.6:

caches_page :except => []
+12
source

you can always hack like:

(YourController.public_instance_methods - ApplicationController.public_instance_methods).each do |x|
  caches_page x.to_sym
end
+2
source

All Articles