Commit 7c47a589 authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch 'sh-feature-flag-persisted-process-cache' into 'master'

Move feature flag list into process cache

See merge request gitlab-org/gitlab!27511
parents 200538b7 3c8efb6a
---
title: Move feature flag list into process cache
merge_request: 27511
author:
type: performance
......@@ -38,7 +38,7 @@ class Feature
begin
# We saw on GitLab.com, this database request was called 2300
# times/s. Let's cache it for a minute to avoid that load.
Gitlab::ThreadMemoryCache.cache_backend.fetch('flipper:persisted_names', expires_in: 1.minute) do
Gitlab::ProcessMemoryCache.cache_backend.fetch('flipper:persisted_names', expires_in: 1.minute) do
FlipperFeature.feature_names
end
end
......
......@@ -42,7 +42,7 @@ describe Feature do
.once
.and_call_original
expect(Gitlab::ThreadMemoryCache.cache_backend)
expect(Gitlab::ProcessMemoryCache.cache_backend)
.to receive(:fetch)
.once
.with('flipper:persisted_names', expires_in: 1.minute)
......
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