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
b2cdc30f
Commit
b2cdc30f
authored
Feb 14, 2022
by
Robert May
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable caching on merge requests API
Changelog: performance
parent
f536b8cd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
21 deletions
+1
-21
config/feature_flags/development/api_caching_merge_requests.yml
.../feature_flags/development/api_caching_merge_requests.yml
+0
-8
lib/api/merge_requests.rb
lib/api/merge_requests.rb
+1
-5
spec/requests/api/merge_requests_spec.rb
spec/requests/api/merge_requests_spec.rb
+0
-8
No files found.
config/feature_flags/development/api_caching_merge_requests.yml
deleted
100644 → 0
View file @
f536b8cd
---
name
:
api_caching_merge_requests
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/61067
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/330342
milestone
:
'
13.12'
type
:
development
group
:
group::source code
default_enabled
:
false
lib/api/merge_requests.rb
View file @
b2cdc30f
...
...
@@ -207,11 +207,7 @@ module API
options
=
serializer_options_for
(
merge_requests
).
merge
(
project:
user_project
)
options
[
:project
]
=
user_project
if
Feature
.
enabled?
(
:api_caching_merge_requests
,
user_project
,
type: :development
,
default_enabled: :yaml
)
present_cached
merge_requests
,
expires_in:
2
.
days
,
**
options
else
present
merge_requests
,
options
end
present_cached
merge_requests
,
expires_in:
2
.
days
,
**
options
end
desc
'Create a merge request'
do
...
...
spec/requests/api/merge_requests_spec.rb
View file @
b2cdc30f
...
...
@@ -1005,14 +1005,6 @@ RSpec.describe API::MergeRequests do
it_behaves_like
'merge requests list'
context
'when :api_caching_merge_requests is disabled'
do
before
do
stub_feature_flags
(
api_caching_merge_requests:
false
)
end
it_behaves_like
'merge requests list'
end
it
"returns 404 for non public projects"
do
project
=
create
(
:project
,
:private
)
...
...
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