Commit 8d78662e authored by Jacob Vosmaer's avatar Jacob Vosmaer

Give the Rails cache its own Redis namespace

Before this change, Rails cache data was stored in a global Redis
namespace. As a consequence, clearing the Rails cache (`rake
cache:clear`) would also delete all Sidekiq queue data and session
storage. This change puts all Rails cache data in a `cache:gitlab`
namespace, making `rake cache:clear` safe again.
parent 0d3ba71b
......@@ -17,6 +17,7 @@ v 6.8.0
- Fix download link for huge MR diffs
- Expose event and mergerequest timestamps in API
- Fix emails on push service when only one commit is pushed
- Store Rails cache data in the Redis `cache:gitlab` namespace
v 6.7.3
- Fix the merge notification email not being sent (Pierre de La Morinerie)
......
......@@ -53,7 +53,7 @@ Gitlab::Application.configure do
else
"redis://localhost:6379"
end
config.cache_store = :redis_store, resque_url
config.cache_store = :redis_store, resque_url, {namespace: 'cache:gitlab'}
# Enable serving of images, stylesheets, and JavaScripts from an asset server
# config.action_controller.asset_host = "http://assets.example.com"
......
......@@ -2,7 +2,7 @@
Gitlab::Application.config.session_store(
:redis_store, # Using the cookie_store would enable session replay attacks.
servers: Gitlab::Application.config.cache_store.last, # re-use the Redis config from the Rails cache store
servers: Gitlab::Application.config.cache_store[1], # re-use the Redis config from the Rails cache store
key: '_gitlab_session',
secure: Gitlab.config.gitlab.https,
httponly: true,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment