Mercurial > zeropaste
diff 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 |
line wrap: on
line diff
--- a/config/application.rb Sun Apr 06 01:23:15 2014 +0900 +++ b/config/application.rb Sun Apr 06 03:04:43 2014 +0900 @@ -63,13 +63,13 @@ # Version of your assets, change this if you want to expire all your assets config.assets.version = '1.0' - # Save cache in different location to avoid collision. - config.action_controller.page_cache_directory = config.root.join('public', 'cache') - - # Enable compression for page caches. - config.action_controller.page_cache_compression = :best_compression - # No need to initialize application when precompiling assets config.assets.initialize_on_precompile = false + + if ENV["ZP_MEMCACHE"] + config.cache_store = :dalli_store, ENV["ZP_MEMCACHE"].split(","), { :namespace => "zeropaste" } + else + config.cache_store = :null_store + end end end