]> git.openstreetmap.org Git - rails.git/commitdiff
Configure page caching in the production environment
authorTom Hughes <tom@compton.nu>
Mon, 23 Sep 2013 09:39:11 +0000 (10:39 +0100)
committerTom Hughes <tom@compton.nu>
Mon, 23 Sep 2013 09:39:11 +0000 (10:39 +0100)
config/environments/production.rb
config/initializers/page_cache.rb [deleted file]

index b47013a8a89f4be917f2767f0e8acae34c22fe6f..3557d8d8b90a5e0bfbcca736a234ff5e2aceb3a3 100644 (file)
@@ -61,6 +61,9 @@ OpenStreetMap::Application.configure do
     config.cache_store = :mem_cache_store, MEMCACHE_SERVERS, { :namespace => "rails:cache" }
   end
 
+  # Configure caching of static assets
+  config.action_controller.page_cache_directory = Rails.public_path
+
   # Enable serving of images, stylesheets, and JavaScripts from an asset server.
   # config.action_controller.asset_host = "http://assets.example.com"
 
diff --git a/config/initializers/page_cache.rb b/config/initializers/page_cache.rb
deleted file mode 100644 (file)
index e00d1c2..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-# Set the page cache directory
-Rails.application.config.action_controller.page_cache_directory = "#{Rails.root.to_s}/public"