diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2007-12-16 23:10:48 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2007-12-16 23:10:48 +0000 |
commit | d8f2fea813ef46022cf828eb90b2af9c656854e0 (patch) | |
tree | 1accde8022e01ef5aab35ad8f3d54e2c53f32ea4 | |
parent | 7af985f74fdaead950986038570f4d00befe7fc0 (diff) | |
download | rails-d8f2fea813ef46022cf828eb90b2af9c656854e0.tar.gz rails-d8f2fea813ef46022cf828eb90b2af9c656854e0.tar.bz2 rails-d8f2fea813ef46022cf828eb90b2af9c656854e0.zip |
Turned on ActionView::Base.cache_template_loading by default in config/environments/production.rb to prevent file system stat calls for every template loading to see if it changed (this means that you have to restart the application to see template changes in production mode) [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8416 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r-- | railties/CHANGELOG | 4 | ||||
-rw-r--r-- | railties/environments/production.rb | 1 | ||||
-rw-r--r-- | railties/lib/tasks/misc.rake | 8 |
3 files changed, 7 insertions, 6 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG index 469f048a28..96f90abd48 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,6 +1,8 @@ *SVN* -* Introduce `rake generate:secret` to output a crytographically secure secret key for use with cookie sessions. #xxxx [update from Trac] +* Turned on ActionView::Base.cache_template_loading by default in config/environments/production.rb to prevent file system stat calls for every template loading to see if it changed (this means that you have to restart the application to see template changes in production mode) [DHH] + +* Introduce `rake secret` to output a crytographically secure secret key for use with cookie sessions #xxxx [update from Trac] * Fixed that local database creation should consider 127.0.0.1 local #9026 [parcelbrat] diff --git a/railties/environments/production.rb b/railties/environments/production.rb index cb295b83f1..91f541c4b0 100644 --- a/railties/environments/production.rb +++ b/railties/environments/production.rb @@ -10,6 +10,7 @@ config.cache_classes = true # Full error reports are disabled and caching is turned on config.action_controller.consider_all_requests_local = false config.action_controller.perform_caching = true +config.action_view.cache_template_loading = true # Enable serving of images, stylesheets, and javascripts from an asset server # config.action_controller.asset_host = "http://assets.example.com" diff --git a/railties/lib/tasks/misc.rake b/railties/lib/tasks/misc.rake index d145db0934..e44ab2cf17 100644 --- a/railties/lib/tasks/misc.rake +++ b/railties/lib/tasks/misc.rake @@ -4,9 +4,7 @@ task :environment do end require 'rails_generator/secret_key_generator' -namespace :generate do - desc 'Generate a crytographically secure secret key. This is typically used to generate a secret for cookie sessions. Pass a unique identifier to the generator using ID="some unique identifier" for greater security.' - task :secret do - puts Rails::SecretKeyGenerator.new(ENV['ID']).generate_secret - end +desc 'Generate a crytographically secure secret key. This is typically used to generate a secret for cookie sessions. Pass a unique identifier to the generator using ID="some unique identifier" for greater security.' +task :secret do + puts Rails::SecretKeyGenerator.new(ENV['ID']).generate_secret end |