Opened 10 years ago

Closed 10 years ago

#21688 closed Cleanup/optimization (fixed)

Invalidate internal caches when INSTALLED_APPS changes

Reported by: Aymeric Augustin Owned by: nobody
Component: Testing framework Version: dev
Severity: Normal Keywords: app-loading
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

We should review all calls to apps.get_apps_configs and check if the result gets cached, either by the caller or one of its callers, recursively.

When results are cached, the cache should be invalidated when INSTALLED_APPS changes.

(Filed under "testing" because that's the only situation where it's legal to change settings and the changes go in django.test.signals.)

Change History (6)

comment:1 by Aymeric Augustin, 10 years ago

Keywords: app-loading added

comment:2 by Aymeric Augustin, 10 years ago

Triage Stage: UnreviewedAccepted

comment:3 by Aymeric Augustin, 10 years ago

Obsolete utilities such as TransRealMixin should also be removed as part of this ticket.

comment:4 by Aymeric Augustin <aymeric.augustin@…>, 10 years ago

In f17d00278ee4a22421dc8148588d94fe7fa17427:

Wiped get_commands() cache when INSTALLED_APPS changes.

Refs #21018, #21688.

comment:5 by Aymeric Augustin, 10 years ago

Has patch: set

PR: https://github.com/django/django/pull/2217

This doesn't have much to do with app-loading, in fact...

comment:6 by Aymeric Augustin <aymeric.augustin@…>, 10 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top