Commit e8fed737 authored by Sean McGivern's avatar Sean McGivern

Merge branch '325656-cache-state-counts-for-issuables-list-no-params-4' into 'master'

Expire cache in IssuablesCountForState every 1 hour

See merge request gitlab-org/gitlab!69871
parents 7f00336f 297774d6
......@@ -6,7 +6,7 @@ module Gitlab
# The name of the Gitlab::SafeRequestStore cache key.
CACHE_KEY = :issuables_count_for_state
# The expiration time for the Rails cache.
CACHE_EXPIRES_IN = 10.minutes
CACHE_EXPIRES_IN = 1.hour
THRESHOLD = 1000
# The state values that can be safely casted to a Symbol.
......
......@@ -71,7 +71,7 @@ RSpec.describe Gitlab::IssuablesCountForState do
let_it_be(:user) { create(:user) }
let_it_be(:group) { create(:group) }
let(:cache_options) { { expires_in: 10.minutes } }
let(:cache_options) { { expires_in: 1.hour } }
let(:cache_key) { ['group', group.id, 'issues'] }
let(:threshold) { described_class::THRESHOLD }
let(:states_count) { { opened: 1, closed: 1, all: 2 } }
......
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