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
This commit is contained in:
Yorick Peterse 2018-02-19 14:27:39 +01:00
parent 0b032daa11
commit ef99a3c8bc
No known key found for this signature in database
GPG Key ID: EDD30D2BEB691AC9
2 changed files with 6 additions and 1 deletions

View File

@ -0,0 +1,5 @@
---
title: Increase feature flag cache TTL to one hour
merge_request:
author:
type: performance

View File

@ -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