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>2021-09-06 12:11:02 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-09-06 12:11:02 +0300
commitaea64c367b180ea549aa115d8312b7c1832bc0b3 (patch)
tree31380951356b27ac47cc401f3fef2d4e59782c16 /lib/gitlab
parent578fc865330cb9ce65746ea5c03e993348e62c96 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab')
-rw-r--r--lib/gitlab/encoding_helper.rb10
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/gitlab/encoding_helper.rb b/lib/gitlab/encoding_helper.rb
index 50e7631d983..2e0060c7c18 100644
--- a/lib/gitlab/encoding_helper.rb
+++ b/lib/gitlab/encoding_helper.rb
@@ -40,15 +40,7 @@ module Gitlab
def detect_encoding(data, limit: CharlockHolmes::EncodingDetector::DEFAULT_BINARY_SCAN_LEN, cache_key: nil)
return if data.nil?
- if Feature.enabled?(:cached_encoding_detection, type: :development, default_enabled: :yaml)
- return CharlockHolmes::EncodingDetector.new(limit).detect(data) unless cache_key.present?
-
- Rails.cache.fetch([:detect_binary, CharlockHolmes::VERSION, cache_key], expires_in: 1.week) do
- CharlockHolmes::EncodingDetector.new(limit).detect(data)
- end
- else
- CharlockHolmes::EncodingDetector.new(limit).detect(data)
- end
+ CharlockHolmes::EncodingDetector.new(limit).detect(data)
end
def detect_binary?(data, detect = nil)