Opened 7 years ago

Closed 7 years ago

#19347 closed Cleanup/optimization (fixed)

Irrelevant line of code in django/middleware/

Reported by: gregplaysguitar@… Owned by: nobody
Component: Core (Other) Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no


This is minor, but could potentially be misleading. Line 129 of django/middleware/

        self.cache_anonymous_only = getattr(settings, 'CACHE_MIDDLEWARE_ANONYMOUS_ONLY', False)

should be removed, because the self.cache_anonymous_only variable is never used. All of the "anonymous only" logic is in the UpdateCacheMiddleware class. See

Change History (2)

comment:1 Changed 7 years ago by Claude Paroz

Component: UncategorizedCore (Other)
Easy pickings: set
Triage Stage: UnreviewedAccepted
Type: UncategorizedCleanup/optimization

comment:2 Changed 7 years ago by Claude Paroz <claude@…>

Resolution: fixed
Status: newclosed

In c0efbc7b534c716fdfba2e5e32a4c41b90f334eb:

Fixed #19347 -- Removed unused variable definition in FetchFromCacheMiddleware

Thanks gregplaysguitar at for the report.

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