jalmenarez / minify

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

Minify_Source::getDigest should include filemtime #79

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I've just stumbled upon "minify" and from looking at the source it appears
that Minify_Source::getDigest should also include the filemtime of the
source files, since that affects the output (i.e. source file has changed).

I've not tested it, and in case I'm wrong, please just close this ticket.

Thanks.

Original issue reported on code.google.com by dhahler@gmail.com on 21 Jan 2009 at 6:14

GoogleCodeExporter commented 9 years ago
getDigest() is used to determine a cache id to hold the resulting content. The 
cache's freshness *is* determined by filemtimes (Minify_Source has 
$lastModifiedTime 
and Minify checks it), but filemtime is not needed in the cache id. In fact you 
don't want it to, because that would just abandon cache files instead of 
reusing 
them. Your proposal would have identical functionality, but would waste disk 
space 
in the cache directory over time.

Thanks for looking over it though.

Original comment by mrclay....@gmail.com on 21 Jan 2009 at 7:30