You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default c.cache is set to false, which means an application always parses a manifest.json. In development, you should set cache false usually. Instead, setting it true which caches the manifest in memory is recommended basically.
However, all of the helpers call get_manifest_by_key which calls Minipack.configuration.manifests. Looking at the source for manifests:
defmanifestsraiseError,'Calling #manifests is only allowed from a root'unlessroot?repo=ManifestRepository.new# Determine if a single manifest mode or multiple manifests(multiple site) modetargets=@children.empty? ? [self] : @children.valuestargets.eachdo |config|
# Skip sites that a manifest file is not configurednextifconfig.manifest.nil?repo.add(config.id,config.manifest,cache: config.cache)endrepoend
A new repo is created on every call, which means that new manifest is created on every call, which means that we re-read and parse the manifest file on every call. You can verify this in an irb window. Notice that cache is true but the addresses of the returned manifests are different.
From the configuration file:
However, all of the helpers call
get_manifest_by_key
which callsMinipack.configuration.manifests
. Looking at the source formanifests
:A new
repo
is created on every call, which means that newmanifest
is created on every call, which means that we re-read and parse the manifest file on every call. You can verify this in an irb window. Notice that cache istrue
but the addresses of the returned manifests are different.The text was updated successfully, but these errors were encountered: