Closed PLPeeters closed 8 years ago
Hi @PLPeeters. The recent bump to version 1.x.x
has removed the functionality for cache busting using a query string. Have a read through the documentation and issue #147 for more info
Hi,
Reading through the issue, I see why it would make sense to prefer cache busting by rewriting files entirely. However, in my case, my build process is set up in a way that prevents me from using that method.
I would change my build process entirely if I could, but that's something I can't do for now, because it would require changing the server config for multiple projects.
In the end, why not leave the choice of the cache busting method up to the end user? I totally see why you wouldn't want to bloat the code with unnecessary options, but I think this one makes sense and could be a relatively common use case.
Anyway, I've made my case, the rest is up to you :)
I'm not against giving people the option. With the new release I wanted to trim the fat and then see what people noticed was missing. I've left some comments so after they're done I'm happy to add the feature back in
Sure thing. I hesitated regarding the named parameter too, guess I'll just leave the hash then.
A few more things to do:
queryString
optionpackage.json
fileOn it.
@hollandben Any particular reason this hasn't been merged yet? :)
Nope - I hadn't seen/been notified of the commits tbh. Will have a look shortly
I guessed that might have been the case, hence my comment :)
Nice - thanks
Have publish v1.2.0
- I bumped it a minor version as it was a new feature for this major release
This PR adds an option named
useUrlParam
that makes it possible to cache-bust using a URL parameter instead of copying files to add a version number directly to the filename. It replaces references like/path/to/asset.js
with/path/to/asset.js?cache-bust=HASH
without touching the file.