﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
28604	Prevent ManifestStaticFilesStorage from leaving behind intermediate files	Ed Morley	Nathan Gaberel	"Currently when using `ManifestStaticFilesStorage`, collectstatic generates duplicate versions of some files. 

For example looking at the output for `contrib.admin` for Django 1.11.5, there is:

{{{
admin/css/base.css
admin/css/base.5af66c1b1797.css
admin/css/base.6b517d0d5813.css
admin/css/base.31652d31b392.css
}}}

This is exacerbated when using something like WhiteNoise's `CompressedStaticFilesMixin`, which then has to spend extra time generating gzip and Brotli compressed versions of every file (or else try and work around it: [https://github.com/evansd/whitenoise/issues/147 evansd/whitenoise#147]).

This was called unavoidable/working as intended according to:
https://code.djangoproject.com/ticket/24452#comment:16
https://github.com/django/django/pull/6507

However now that it's looking like `CachedStaticFilesStorage` will end up being removed ([https://groups.google.com/forum/#!topic/django-developers/fmfQvuHBStk mailing list thread]; or at the very least we're discouraging people from using it, since it's buggy in several scenarios) - the intermediate files needn't be left behind.

Even before `CachedStaticFilesStorage` ends up being removed, we could perhaps add a `keep_intermediate_files` property to `HashedFilesMixin`, that is set to `False` for `CachedStaticFilesStorage` and `True` for `ManifestStaticFilesStorage`, allowing us to fix the latter in the meantime."	Cleanup/optimization	closed	contrib.staticfiles	dev	Normal	fixed	ManifestStaticFilesStorage, HashedFilesMixin		Ready for checkin	1	0	0	0	0	0
