summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2018-02-19 14:27:39 +0100
committerYorick Peterse <yorickpeterse@gmail.com>2018-02-19 14:28:22 +0100
commitef99a3c8bc09e9f03ee9aec5c07bfeca6b7d7adf (patch)
tree21b007544ade99dcfcb296cc55e81f3b2a82aa9d
parent0b032daa11d5ea140f2eea99fa10b21da4b50f0b (diff)
downloadgitlab-ce-ef99a3c8bc09e9f03ee9aec5c07bfeca6b7d7adf.tar.gz
Increase feature flag cache TTL to one hour
Flipper already takes care of flushing cache entries when enabling/disabling features so it should be safe to increase the TTL. This in turn should drastically reduce the number of Flipper queries executed. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/40854
-rw-r--r--changelogs/unreleased/flipper-caching.yml5
-rw-r--r--config/initializers/flipper.rb2
2 files changed, 6 insertions, 1 deletions
diff --git a/changelogs/unreleased/flipper-caching.yml b/changelogs/unreleased/flipper-caching.yml
new file mode 100644
index 00000000000..6db27fd579e
--- /dev/null
+++ b/changelogs/unreleased/flipper-caching.yml
@@ -0,0 +1,5 @@
+---
+title: Increase feature flag cache TTL to one hour
+merge_request:
+author:
+type: performance
diff --git a/config/initializers/flipper.rb b/config/initializers/flipper.rb
index cc9167d29b9..c60ad535fd5 100644
--- a/config/initializers/flipper.rb
+++ b/config/initializers/flipper.rb
@@ -8,7 +8,7 @@ Flipper.configure do |config|
cached_adapter = Flipper::Adapters::ActiveSupportCacheStore.new(
adapter,
Rails.cache,
- expires_in: 10.seconds)
+ expires_in: 1.hour)
Flipper.new(cached_adapter)
end