fix for production config
This commit is contained in:
@@ -40,7 +40,7 @@ Danbooru::Application.configure do
|
|||||||
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
||||||
|
|
||||||
# Use a different cache store in production
|
# Use a different cache store in production
|
||||||
config.cache_store = :dalli_store, Danbooru.config.memcached_servers
|
# config.cache_store = :dalli_store, Danbooru.config.memcached_servers
|
||||||
|
|
||||||
# Enable serving of images, stylesheets, and JavaScripts from an asset server
|
# Enable serving of images, stylesheets, and JavaScripts from an asset server
|
||||||
# config.action_controller.asset_host = "http://assets.example.com"
|
# config.action_controller.asset_host = "http://assets.example.com"
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
unless defined?(MEMCACHE)
|
unless defined?(MEMCACHE)
|
||||||
MEMCACHE = Dalli::Client.new(Danbooru.config.memcached_servers, :namespace => Danbooru.config.app_name.gsub(/[^A-Za-z0-9]/, "_"))
|
MEMCACHE = Dalli::Client.new(Danbooru.config.memcached_servers, :namespace => Danbooru.config.app_name.gsub(/[^A-Za-z0-9]/, "_"))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if Rails.env.production?
|
||||||
|
Danbooru::Application.configure do
|
||||||
|
config.cache_store = :dalli_store, Danbooru.config.memcached_servers
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user