comparison config/application.rb @ 320:612bc7c32324

Use memcached for caching.
author edogawaconan <me@myconan.net>
date Sun, 06 Apr 2014 03:04:43 +0900
parents 207853e26088
children 7c7b7906ebd9
comparison
equal deleted inserted replaced
319:4944db0f98d8 320:612bc7c32324
61 config.assets.enabled = true 61 config.assets.enabled = true
62 62
63 # Version of your assets, change this if you want to expire all your assets 63 # Version of your assets, change this if you want to expire all your assets
64 config.assets.version = '1.0' 64 config.assets.version = '1.0'
65 65
66 # Save cache in different location to avoid collision.
67 config.action_controller.page_cache_directory = config.root.join('public', 'cache')
68
69 # Enable compression for page caches.
70 config.action_controller.page_cache_compression = :best_compression
71
72 # No need to initialize application when precompiling assets 66 # No need to initialize application when precompiling assets
73 config.assets.initialize_on_precompile = false 67 config.assets.initialize_on_precompile = false
68
69 if ENV["ZP_MEMCACHE"]
70 config.cache_store = :dalli_store, ENV["ZP_MEMCACHE"].split(","), { :namespace => "zeropaste" }
71 else
72 config.cache_store = :null_store
73 end
74 end 74 end
75 end 75 end