Opened 3 years ago

Closed 3 years ago

#32493 closed Cleanup/optimization (fixed)

Remove unnecessary use of never_cache in admin views

Reported by: Tim McCurrach Owned by: Tim McCurrach
Component: contrib.admin Version: 3.1
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

All admin views (apart from login) are wrapped with self.admin_view which applies never_cache already. Decorating the views themselves with never_cache is superfluous.

Change History (6)

comment:1 by Tim McCurrach, 3 years ago

Has patch: set

comment:2 by Carlton Gibson, 3 years ago

Triage Stage: UnreviewedAccepted

OK, I'll accept this as it looks correct… — I feel like we should have some tests that admin views are in fact correctly wrapped, but e.g. #32468 didn't have them 🤔

in reply to:  2 comment:3 by Mariusz Felisiak, 3 years ago

Replying to Carlton Gibson:

OK, I'll accept this as it looks correct… — I feel like we should have some tests that admin views are in fact correctly wrapped, but e.g. #32468 didn't have them 🤔

A lot of tests crash without 63bbfa9f4501425f4bdabe05a79132a22dfbeb5a because we added an error message in the subsequent commit 3fd82a62415e748002435e7bad06b5017507777c.

comment:4 by Carlton Gibson, 3 years ago

I feel like we should have some tests...

Covered by admin_views.tests.NeverCacheTests

comment:5 by Carlton Gibson, 3 years ago

Triage Stage: AcceptedReady for checkin

comment:6 by GitHub <noreply@…>, 3 years ago

Resolution: fixed
Status: assignedclosed

In f55f3ce8:

Fixed #32493 -- Removed redundant never_cache uses from admin views.

Co-authored-by: Carlton Gibson <carlton.gibson@…>

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