This project is archived and is in readonly mode.
config.action_controller.perform_caching is ignored
-
Neeraj Singh
I tested it with rails3 edge and am not able to reproduce this issue. I was expecting page caching but I do not see any page cached. This is what I did.
rails demo
cd demo
rails g scaffold User name:string
rake db:migrate
rails svisit http://localhost:3000/users
Looked at public directory and I do not see any page cached.
-
Simone Carletti
The code you posted shouldn't automatically perform page caching, unless you specify
cache_pagesin your controller.
However, I switched to rails edge the project and the issue seems to be fixed.The ticket can be closed, thank you.
-
Neeraj Singh
You are right. I forgot to add cache_pages.
Anyway it seems it is no more an issue.
-
Jérémy Lecour
- Tag changed from rails 3.0.0.beta3, actioncontroller, perform_caching to rails 3.0.0.beta3, actioncontroller, caching, perform_caching
Today, I've pulled my hair on something that seems similar.
I'm working on a Rails 3.0.0.beta.3 app where I want to do some page caching.
In "Rails.root/config/development.rb" I've put
config.action_controller.perform_caching = true config.page_cache_directory = File.join Rails.root, 'public', 'cache' config.action_controller.page_cache_directory = File.join Rails.root, 'public', 'cache'I've tried two different "page_cache_directory" directives because I've seen both in blog posts, docs, …
Whatever I put in theses directives, the page cache is written in "Rails.root/public/"
In the same file, if I write "ActionController::Base.page_cache_directory = File.join Rails.root, 'public', 'cache'" inside or outside the "MyApp::Application.configure" block, it has no effect.
BUT, if I make an initializer with it, it's working great.
-
Jérémy Lecour
I've tried to install (with bundler) the master branch from Github (http://github.com/rails/rails/commit/446b0ffe1c804f4925867d785b9709...) and it seems fixed.
The correct directive to put in the environment file is
config.action_controller.page_cache_directory = File.join Rails.root, 'public', 'cache'The other one, has no effect.
There is no need to make a specific initializer.
-
Jérémy Lecour
As I've said, the bug is already resolved. But If you like to have an "history", I can make a new issue that you'll immediately close.
Thanks
-
mirza
I have the same problem:
config.action_controller.perform_caching = falsein development.rb is ignored and caching is performed always.