Fix for multiple cacheId prefixes in the precache handler #720
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
R: @addyosmani @gauntface
CC: @HenrikJoreteg @liuruoran88
This fixes #714 by explicitly changing the method call inside of
WorkboxSW
to indicate that for the internalCacheOnly
handler use for precached requests,cacheId
shouldn't be prepended when determining the corresponding cache name.I decided to go with that approach rather than making a chance in the
RequestWrapper
constructor that checked to see ifcacheId
was already present in thecacheName
, since you could theoretically imagine callingIn that situation, the user would expect the effective cache name to be
'my-prefix-my-prefix'
, and we'd want to still allow that.