diff options
author | Douwe Maan <douwe@gitlab.com> | 2018-09-07 18:42:01 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-09-07 18:42:01 +0300 |
commit | b027b3e037a328cc8a699d6befa796039c03b44b (patch) | |
tree | 65cd8b73fa9e8e94595e73acc10f81f1880e0c29 /app/services/merge_requests | |
parent | 99f1a222dc8bd17f3becf75b172ab645368a4566 (diff) | |
parent | cd1d5b244072c6701e77c6bd7be9e9a0d60f8967 (diff) |
Merge branch 'osw-write-cache-upon-mr-creation-and-cache-refactoring' into 'master'
Write diff highlighting cache upon MR creation (refactors caching)
Closes #50204
See merge request gitlab-org/gitlab-ce!21489
Diffstat (limited to 'app/services/merge_requests')
-rw-r--r-- | app/services/merge_requests/reload_diffs_service.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/merge_requests/reload_diffs_service.rb b/app/services/merge_requests/reload_diffs_service.rb index 8d85dc9eb5f..1390ae0e199 100644 --- a/app/services/merge_requests/reload_diffs_service.rb +++ b/app/services/merge_requests/reload_diffs_service.rb @@ -30,7 +30,7 @@ module MergeRequests def clear_cache(new_diff) # Executing the iteration we cache highlighted diffs for each diff file of # MergeRequestDiff. - new_diff.diffs_collection.diff_files.to_a + new_diff.diffs_collection.write_cache # Remove cache for all diffs on this MR. Do not use the association on the # model, as that will interfere with other actions happening when @@ -38,7 +38,7 @@ module MergeRequests MergeRequestDiff.where(merge_request: merge_request).each do |merge_request_diff| next if merge_request_diff == new_diff - merge_request_diff.diffs_collection.clear_cache! + merge_request_diff.diffs_collection.clear_cache end end end |