Commit 0a003ee7 authored by Mike Greiling's avatar Mike Greiling

Merge branch 'mattkasa/reduce-webpack-dev-server-manifest-calls' into 'master'

Reduce webpack dev server manifest calls

See merge request gitlab-org/gitlab!50105
parents c7eddac1 b70283c8
...@@ -69,8 +69,8 @@ module Gitlab ...@@ -69,8 +69,8 @@ module Gitlab
def manifest def manifest
if Gitlab.config.webpack.dev_server.enabled if Gitlab.config.webpack.dev_server.enabled
# Don't cache if we're in dev server mode, manifest may change ... # Only cache at request level if we're in dev server mode, manifest may change ...
load_manifest Gitlab::SafeRequestStore.fetch('manifest.json') { load_manifest }
else else
# ... otherwise cache at class level, as JSON loading/parsing can be expensive # ... otherwise cache at class level, as JSON loading/parsing can be expensive
strong_memoize(:manifest) { load_manifest } strong_memoize(:manifest) { load_manifest }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment