Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2016-02-18 22:38:00 +0300
committerRémy Coutable <remy@rymai.me>2016-02-19 18:25:23 +0300
commit10354f7a58e0d5eb1c1e70f99b087b1824fe334b (patch)
tree1b36183a3c0f1a4ebfbb30442969e9fa3792daa3 /config
parentd3e79985b401b259330a20530eab1c9a33f8c4f9 (diff)
Merge branch 'cache-clear' into 'master'
Use SCAN during 'rake cache:clear' This allows 'rake cache:clear' to delete millions of keys without choking. It requires Redis 2.8.0 or newer but we needed that already anyway. See merge request !2872
Diffstat (limited to 'config')
-rw-r--r--config/application.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/config/application.rb b/config/application.rb
index 1e9ec74cdbf..0d596ed22f5 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -6,6 +6,8 @@ I18n.config.enforce_available_locales = false
Bundler.require(:default, Rails.env)
module Gitlab
+ REDIS_CACHE_NAMESPACE = 'cache:gitlab'
+
class Application < Rails::Application
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
@@ -89,7 +91,7 @@ module Gitlab
redis_config_hash[:path] = redis_uri.path
end
- redis_config_hash[:namespace] = 'cache:gitlab'
+ redis_config_hash[:namespace] = REDIS_CACHE_NAMESPACE
redis_config_hash[:expires_in] = 2.weeks # Cache should not grow forever
config.cache_store = :redis_store, redis_config_hash