Django Compress Creating Outdated CSS Versioned Files
I'm using django-compress to minify my JS and CSS files and I've found it works great and really speeds up my site when it works.
Problem is, I've been using the FarFutureExpires feature to generate versioned files, but I've found in some scenarios django-compress seems to generate old file names on disk, so that my generated HTML includes references to a more recent version that what was created by the manage.py synccompress
command.
For example:
./manage.py synccompress
CSS Group 'content_css'
-----------------------
Version: 1311733749
Removing outdated file content.min1311643450.css
Saving min/css/content.min1311643450.css
CSS Group 'accou开发者_开发技巧nt_css'
-----------------------
Version: 1311733749
Removing outdated file account.min1311643450.css
Saving min/css/account.min1311643450.css
CSS Group 'file_css'
---------------------------
Version: 1311733749
Removing outdated file file.min1311643450.css
Saving min/css/file.min1311643450.css
CSS Group 'home_css'
--------------------
Version: 1311733749
Removing outdated file home.min1310605109.css
Saving min/css/home.min1310605109.css
Here you can see the latest version is 1311733749, and this is what appears in my rendered markup, but for some reason an older revision, 1310605109, is actually created on disk. I then have to go manually mv all the filenames to the correct version in order to use get the site to load properly.
I've looked through the docs and searched online but I can't find anything - anyone know offhand why this might occur before I go to the source?
精彩评论