summaryrefslogtreecommitdiff
path: root/lib/gitlab/redis/cache.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/redis/cache.rb')
-rw-r--r--lib/gitlab/redis/cache.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/redis/cache.rb b/lib/gitlab/redis/cache.rb
index a2c7b5e29db..4ab1024d528 100644
--- a/lib/gitlab/redis/cache.rb
+++ b/lib/gitlab/redis/cache.rb
@@ -12,7 +12,7 @@ module Gitlab
redis: pool,
compress: Gitlab::Utils.to_boolean(ENV.fetch('ENABLE_REDIS_CACHE_COMPRESSION', '1')),
namespace: CACHE_NAMESPACE,
- expires_in: 2.weeks # Cache should not grow forever
+ expires_in: ENV.fetch('GITLAB_RAILS_CACHE_DEFAULT_TTL_SECONDS', 2.weeks).to_i # Cache should not grow forever
}
end
end