Closed mitio closed 13 years ago
I just saw the very same thing in the following commit, but implemented a bit differently: cws125/jammit@931e54d
Oops -- merged this, but the mtime implementation you linked to looks a little less invasive -- making the change.
Alright -- the two approaches are sort of fused in that last commit. Thanks for building this.
Disclaimer: As this is my first pull request and even one of the very few times I've even pushed to GitHub, please let me know if I'm doing something in a wrong way.
I've made a small change to
Jammit::Packager#precache_all
, which should set the mtime of the resulting cached package file to the mtime of the newest file in the package which is being processed. This change should affect only pre-caching via thejammit
command (or any code which usesJammit.package!
).I think that this way we will preserve correct invalidation but will minimize occasions when the pre-cached content is being cache-invalidated in browsers because of, say, pre-caching during deployment. This would be advantageous in case your source files have correct mtimes after deployment (which is the case when you
svn export
, for example).All comments are welcome.