Opened 7 years ago

Closed 6 years ago

Last modified 5 years ago

#28606 closed Cleanup/optimization (fixed)

Deprecate CachedStaticFilesStorage

Reported by: Ed Morley Owned by: nobody
Component: contrib.staticfiles Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

CachedStaticFilesStorage has a number of drawbacks, and the docs in fact already steer people away from using it:
https://docs.djangoproject.com/en/1.11/ref/contrib/staticfiles/#django.contrib.staticfiles.storage.CachedStaticFilesStorage

An additional problem is that HashedFilesMixin has had to make several compromises in order to support CachedStaticFilesStorage which unfortunately also impacts users of the recommended ManifestStaticFilesStorage backend (see #28604). When these compromises were added in #24452, it was suggested that CachedStaticFilesStorage should just be deprecated/removed instead.

It's now too late to mark it as deprecated for Django 2.0, but we can do so for Django 2.1 which would end up with its removal being in Django 3.0 all the same anyway.

I started this mailing list thread about the deprecation:
https://groups.google.com/forum/#!topic/django-developers/fmfQvuHBStk

Change History (7)

comment:1 by Tim Graham, 7 years ago

Summary: Mark CachedStaticFilesStorage as deprecated in Django 2.1Deprecate CachedStaticFilesStorage
Triage Stage: UnreviewedAccepted

comment:2 by Tim Graham, 6 years ago

Has patch: set

comment:3 by Simon Charette, 6 years ago

Triage Stage: AcceptedReady for checkin

comment:4 by Tim Graham <timograham@…>, 6 years ago

Resolution: fixed
Status: newclosed

In f892781b:

Fixed #28606 -- Deprecated CachedStaticFilesStorage.

comment:5 by Tim Graham <timograham@…>, 6 years ago

In 6713926e:

Refs #28606 -- Corrected deprecation version for CachedStaticFilesStorage.

comment:6 by Tim Graham <timograham@…>, 6 years ago

In a9feec5c:

[2.2.x] Refs #28606 -- Corrected deprecation version for CachedStaticFilesStorage.

Backport of 6713926ebe22172e50f283185f969275c326416d from master

comment:7 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

In f1894bae:

Refs #28606 -- Removed CachedStaticFilesStorage per deprecation timeline.

Note: See TracTickets for help on using tickets.
Back to Top