switch to dalli for memcache adapter, related to #1906
This commit is contained in:
@@ -40,7 +40,7 @@ Danbooru::Application.configure do
|
||||
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
||||
|
||||
# Use a different cache store in production
|
||||
# config.cache_store = :mem_cache_store
|
||||
config.cache_store = :dalli_store, Danbooru.config.memcached_servers
|
||||
|
||||
# Enable serving of images, stylesheets, and JavaScripts from an asset server
|
||||
# config.action_controller.asset_host = "http://assets.example.com"
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
require 'memcache'
|
||||
|
||||
unless defined?(MEMCACHE)
|
||||
MEMCACHE = MemCache.new :c_threshold => 10_000, :compression => true, :debug => false, :namespace => Danbooru.config.app_name.gsub(/[^A-Za-z0-9]/, "_"), :readonly => false, :urlencode => false
|
||||
MEMCACHE.servers = Danbooru.config.memcached_servers
|
||||
end
|
||||
3
config/initializers/z_dalli.rb
Normal file
3
config/initializers/z_dalli.rb
Normal file
@@ -0,0 +1,3 @@
|
||||
unless defined?(MEMCACHE)
|
||||
MEMCACHE = Dalli::Client.new(Danbooru.config.memcached_servers, :namespace => Danbooru.config.app_name.gsub(/[^A-Za-z0-9]/, "_"))
|
||||
end
|
||||
Reference in New Issue
Block a user