Commit b70283c8 authored by Matt Kasa's avatar Matt Kasa

Reduce webpack dev server manifest calls

- Reduces the number of GETs for the manifest.json
  from the webpack dev server from 6 to 1.
parent 0e1bd185
......@@ -69,8 +69,8 @@ module Gitlab
def manifest
if Gitlab.config.webpack.dev_server.enabled
# Don't cache if we're in dev server mode, manifest may change ...
load_manifest
# Only cache at request level if we're in dev server mode, manifest may change ...
Gitlab::SafeRequestStore.fetch('manifest.json') { load_manifest }
else
# ... otherwise cache at class level, as JSON loading/parsing can be expensive
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