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>2020-09-24 06:09:48 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-09-24 06:09:48 +0300
commit5ff6f278d33ccb9c4b24130580f754c7fcd2f39e (patch)
tree261ab8fea575d6e6277fccb609dafc583291d4d5 /lib/gitlab/webpack
parent28b18e348cae42472a31e94217706795a4821762 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/webpack')
-rw-r--r--lib/gitlab/webpack/manifest.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/gitlab/webpack/manifest.rb b/lib/gitlab/webpack/manifest.rb
index b92890757f4..3424f16b852 100644
--- a/lib/gitlab/webpack/manifest.rb
+++ b/lib/gitlab/webpack/manifest.rb
@@ -24,6 +24,8 @@ module Gitlab
AssetMissingError = Class.new(StandardError)
class << self
+ include Gitlab::Utils::StrongMemoize
+
def entrypoint_paths(source)
raise WebpackError, manifest["errors"] unless manifest_bundled?
@@ -55,6 +57,10 @@ module Gitlab
end
end
+ def clear_manifest!
+ clear_memoization(:manifest)
+ end
+
private
def manifest_bundled?
@@ -67,7 +73,7 @@ module Gitlab
load_manifest
else
# ... otherwise cache at class level, as JSON loading/parsing can be expensive
- @manifest ||= load_manifest
+ strong_memoize(:manifest) { load_manifest }
end
end