Commit 7fab63b41f1a28cc5efa6b9afef30170e41c94ea

Authored by Dmitriy Zaporozhets
2 parents 14c96749 8d78662e

Merge branch 'namespace_redis_cache' into 'master'

Give the Rails cache its own Redis namespace
@@ -17,6 +17,7 @@ v 6.8.0 @@ -17,6 +17,7 @@ v 6.8.0
17 - Fix download link for huge MR diffs 17 - Fix download link for huge MR diffs
18 - Expose event and mergerequest timestamps in API 18 - Expose event and mergerequest timestamps in API
19 - Fix emails on push service when only one commit is pushed 19 - Fix emails on push service when only one commit is pushed
  20 + - Store Rails cache data in the Redis `cache:gitlab` namespace
20 21
21 v 6.7.3 22 v 6.7.3
22 - Fix the merge notification email not being sent (Pierre de La Morinerie) 23 - Fix the merge notification email not being sent (Pierre de La Morinerie)
config/environments/production.rb
@@ -53,7 +53,7 @@ Gitlab::Application.configure do @@ -53,7 +53,7 @@ Gitlab::Application.configure do
53 else 53 else
54 "redis://localhost:6379" 54 "redis://localhost:6379"
55 end 55 end
56 - config.cache_store = :redis_store, resque_url 56 + config.cache_store = :redis_store, resque_url, {namespace: 'cache:gitlab'}
57 57
58 # Enable serving of images, stylesheets, and JavaScripts from an asset server 58 # Enable serving of images, stylesheets, and JavaScripts from an asset server
59 # config.action_controller.asset_host = "http://assets.example.com" 59 # config.action_controller.asset_host = "http://assets.example.com"
config/initializers/session_store.rb
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 2
3 Gitlab::Application.config.session_store( 3 Gitlab::Application.config.session_store(
4 :redis_store, # Using the cookie_store would enable session replay attacks. 4 :redis_store, # Using the cookie_store would enable session replay attacks.
5 - servers: Gitlab::Application.config.cache_store.last, # re-use the Redis config from the Rails cache store 5 + servers: Gitlab::Application.config.cache_store[1], # re-use the Redis config from the Rails cache store
6 key: '_gitlab_session', 6 key: '_gitlab_session',
7 secure: Gitlab.config.gitlab.https, 7 secure: Gitlab.config.gitlab.https,
8 httponly: true, 8 httponly: true,