Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-07-02 16:58:47 +0300
committerStan Hu <stanhu@gmail.com>2019-07-02 17:26:27 +0300
commit385aa46046ec83e6837c106576699f76e65876a7 (patch)
treeb602ce89be24b9c8f2e04f18f6ccde58f2d6ae35 /spec/lib/feature_spec.rb
parente07ebe66af957c46e7c69329b3ab561bb539351b (diff)
Cache Flipper persisted names directly to local memory storage
Now that application settings are no longer dominating network traffic, we see that the Feature#persisted_names is using a significant amount of CPU and network bandwidth for Redis. Move this cache into the thread-local memory storage to reduce Redis overhead.
Diffstat (limited to 'spec/lib/feature_spec.rb')
-rw-r--r--spec/lib/feature_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/lib/feature_spec.rb b/spec/lib/feature_spec.rb
index 6f05914f915..403e0785d1b 100644
--- a/spec/lib/feature_spec.rb
+++ b/spec/lib/feature_spec.rb
@@ -40,7 +40,7 @@ describe Feature do
.once
.and_call_original
- expect(Rails.cache)
+ expect(Gitlab::ThreadMemoryCache.cache_backend)
.to receive(:fetch)
.once
.with('flipper:persisted_names', expires_in: 1.minute)