smah-ajan / minify

Automatically exported from code.google.com/p/minify
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Minify_groupUri() doesn't notice changes in file inclusion/order #241

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Paul Schwarz noticed that "while it does a good job of checking whether files 
have been *modified* it makes no attempt to notice whether the group itself has 
been modified, i.e. adding or removing sources from the group" (or re-ordered).

i.e. GroupUri needs to append a hash of the array of filesnames along w/ the 
max timestamp. Here's what I recommend:
* always starts with "0" so RewriteRules doesn't need to change
* md5(serialize(array(filenames) + array(maxTimestamp)))
* output MD5 in base64 and strip +/=

Original issue reported on code.google.com by mrclay....@gmail.com on 3 Sep 2011 at 11:48

GoogleCodeExporter commented 9 years ago
This won't work either. Including full filepaths and mtimes is the only way to 
catch modifications. On the plus side it won't make MD5's output longer.

Original comment by mrclay....@gmail.com on 3 Sep 2011 at 11:55