BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
b3a588bc
Commit
b3a588bc
authored
Jul 11, 2017
by
Sean McGivern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issuable state caching
We were including controller params in the cache key, so the key for the header didn't match the one for the list itself!
parent
c57ae83d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
7 deletions
+3
-7
issuable_collections.rb
app/controllers/concerns/issuable_collections.rb
+2
-6
issuable_finder.rb
app/finders/issuable_finder.rb
+1
-1
No files found.
app/controllers/concerns/issuable_collections.rb
View file @
b3a588bc
...
...
@@ -32,10 +32,10 @@ module IssuableCollections
def
filter_params
set_sort_order_from_cookie
set_default_scope
set_default_state
@filter_params
=
params
.
dup
# Skip irrelevant Rails routing params
@filter_params
=
params
.
dup
.
except
(
:controller
,
:action
,
:namespace_id
)
@filter_params
[
:sort
]
||=
default_sort_order
@sort
=
@filter_params
[
:sort
]
...
...
@@ -55,10 +55,6 @@ module IssuableCollections
@filter_params
end
def
set_default_scope
params
[
:scope
]
=
'all'
if
params
[
:scope
].
blank?
end
def
set_default_state
params
[
:state
]
=
'opened'
if
params
[
:state
].
blank?
end
...
...
app/finders/issuable_finder.rb
View file @
b3a588bc
...
...
@@ -22,7 +22,7 @@ class IssuableFinder
include
CreatedAtFilter
NONE
=
'0'
.
freeze
IRRELEVANT_PARAMS_FOR_CACHE_KEY
=
%i[utf8 sort page]
.
freeze
IRRELEVANT_PARAMS_FOR_CACHE_KEY
=
%i[utf8 sort page
state
]
.
freeze
attr_accessor
:current_user
,
:params
...
...
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