Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
297774d6
Commit
297774d6
authored
Sep 08, 2021
by
Eugenia Grieff
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expire cache in IssuablesCountForState every hour
- Update specs
parent
8737cd0a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
lib/gitlab/issuables_count_for_state.rb
lib/gitlab/issuables_count_for_state.rb
+1
-1
spec/lib/gitlab/issuables_count_for_state_spec.rb
spec/lib/gitlab/issuables_count_for_state_spec.rb
+1
-1
No files found.
lib/gitlab/issuables_count_for_state.rb
View file @
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
=
1
0
.
minutes
CACHE_EXPIRES_IN
=
1
.
hour
THRESHOLD
=
1000
# The state values that can be safely casted to a Symbol.
...
...
spec/lib/gitlab/issuables_count_for_state_spec.rb
View file @
297774d6
...
...
@@ -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:
1
0
.
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
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment