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
33961ee4
Commit
33961ee4
authored
May 22, 2017
by
Z.J. van de Weg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Etag caching for Pipeline#Show action
Due to a typo this was not actually the case. Now that is fixed and performance should improve because of this.
parent
50a00442
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
router.rb
lib/gitlab/etag_caching/router.rb
+1
-1
router_spec.rb
spec/lib/gitlab/etag_caching/router_spec.rb
+11
-0
No files found.
lib/gitlab/etag_caching/router.rb
View file @
33961ee4
...
...
@@ -38,7 +38,7 @@ module Gitlab
'project_pipelines'
),
Gitlab
::
EtagCaching
::
Router
::
Route
.
new
(
%r(^(?!.*(
#{
RESERVED_WORDS
}
)).*/pipelines/
\d
+
\.
json
\z
)
,
%r(^(?!.*(
#{
RESERVED_WORDS
_REGEX
}
)).*/pipelines/
\d
+
\.
json
\z
)
,
'project_pipeline'
)
].
freeze
...
...
spec/lib/gitlab/etag_caching/router_spec.rb
View file @
33961ee4
...
...
@@ -77,6 +77,17 @@ describe Gitlab::EtagCaching::Router do
expect
(
result
).
to
be_blank
end
it
'matches pipeline#show endpoint'
do
env
=
build_env
(
'/my-group/my-project/pipelines/2.json'
)
result
=
described_class
.
match
(
env
)
expect
(
result
).
to
be_present
expect
(
result
.
name
).
to
eq
'project_pipeline'
end
def
build_env
(
path
)
{
'PATH_INFO'
=>
path
}
end
...
...
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