Skip to content
This repository has been archived by the owner on May 26, 2023. It is now read-only.

Multiple AppCachePlugin instances cause caching of the other caches! #9

Open
tomhicks-bsf opened this issue Sep 24, 2015 · 1 comment

Comments

@tomhicks-bsf
Copy link
Contributor

We use a build that exports multiple cache manifests, for different devices/platforms. Something like:

plugins: [
  new AppCachePlugin({
    exclude: [/ios/],
    name: "android.appcache"
  }),

  new AppCachePlugin({
    exclude: [/android/],
    name: "ios.appcache"
  })
]

Problem is, that produces an iOS appcache that includes the android appcache! I can't think of any reason why anyone would want to cache the appcache, and in fact that can lead to an impossible-to-update application.

Should we automatically exclude /\/\.appcache$/ files?

@lettertwo
Copy link
Owner

Hmm, caching the appcache can never end well, so maybe we should consider some kind of guard here.

Now that we've allowed output to be configured (thanks again!), I'm not sure we can rely on a pattern to protect us from this scenario. Perhaps we could come up with a solution that will automatically exclude the configured output filenames across all instances of the plugin (a 'global' registry, or something).

In the meantime (in case you haven't tried this already), you should be able to add those appcache filenames (or a pattern like /*.\.appcache$/) to your exclude option(s).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants