Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-04 15:07:12 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-04 15:07:12 +0300
commit98420be3dddf5a093c39d96a8ca109aa21d0eaf8 (patch)
tree694cbe805e82d5383dc30c462f5efb60e55ccebe /lib/gitlab/diff/file_collection/merge_request_diff.rb
parentc4038d4bdff93b260cbdcd69f9a6c0b07a849457 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/diff/file_collection/merge_request_diff.rb')
-rw-r--r--lib/gitlab/diff/file_collection/merge_request_diff.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/gitlab/diff/file_collection/merge_request_diff.rb b/lib/gitlab/diff/file_collection/merge_request_diff.rb
index 3d661111f13..1d99349304b 100644
--- a/lib/gitlab/diff/file_collection/merge_request_diff.rb
+++ b/lib/gitlab/diff/file_collection/merge_request_diff.rb
@@ -37,7 +37,11 @@ module Gitlab
private
def cache
- @cache ||= Gitlab::Diff::HighlightCache.new(self)
+ @cache ||= if Feature.enabled?(:hset_redis_diff_caching, project)
+ Gitlab::Diff::HighlightCache.new(self)
+ else
+ Gitlab::Diff::DeprecatedHighlightCache.new(self)
+ end
end
end
end