Caching in get_worker_user() looks like premature optimisation
Bug #1357686 reported by
Gavin Panella
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Low
|
Gavin Panella |
Bug Description
It appears to be trying to eliminate multiple calls to User.get_
The problem is that it introduces a lot of complexity. A cache backend must be configured in maas.settings, and there's code in several places in the test suite to clear the cache. There's even a clearcache command that actually does nothing because the cache backend we have configured is in-memory only.
I suggest we remove the cache.
Related branches
lp:~allenap/maas/eliminate-use-of-django-cache
- Julian Edwards (community): Approve
-
Diff: 185 lines (+5/-82)7 files modifiedsrc/maas/settings.py (+0/-6)
src/maasserver/management/commands/clearcache.py (+0/-38)
src/maasserver/testing/testcase.py (+0/-3)
src/maasserver/tests/test_commands.py (+0/-16)
src/maasserver/tests/test_worker_user.py (+0/-4)
src/maasserver/worker_user.py (+5/-13)
src/maastesting/djangotestcase.py (+0/-2)
Changed in maas: | |
assignee: | nobody → Gavin Panella (allenap) |
status: | Triaged → In Progress |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
milestone: | none → 1.6.1 |
Changed in maas: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.