-
Notifications
You must be signed in to change notification settings - Fork 16
Use precacheHash in the config file in lieu of a precache URL param #57
Conversation
(The |
global.toolbox.precache(global.params.get('precache')); | ||
|
||
var precachePromise; | ||
// When precacheHash is present inside the cacheConfigFile JSON, its a signal that instead of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A minor comment mistake here: I believe that you mean the precacheHash is present in the querystring options, rather than in the JSON.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, nevermind - it comes to here through the options, but is of course originally in the JSON.
As I understand it, the value of I wonder if it would be better to be more open/general about how this is described so that developers understand they can use whichever option works best for them. There are several situations that the hash of filenames method wouldn't handle well. If a file changes but has the same name, for example. On the other hand, most of the easy/lazy ways people might choose have bad problems too, so I don't want to encourage them. If we change the way it is described, we should also consider renaming the option. Perhaps something like fingerprint? |
Thanks, @wibblymat. PTAL. |
Awesome |
Use precacheHash in the config file in lieu of a precache URL param
R: @wibblymat @addyosmani
This PR is blocked on GoogleChromeLabs/sw-toolbox#24, but I've tested it locally with a hack to flatten the array, and it seems to work. It shouldn't be merged until a new
sw-toolbox
release is cut.Once this PR is merged, I expect to tag a
1.2.0
release ofplatinum-sw
, and then I'll put together a related PR against https://github.com/PolymerElements/polymer-starter-kit to account for the new way of doing things.This closes #53