Closed Bug 876523 Opened 11 years ago Closed 11 years ago

django-browserid doesn't take advantage of cache machine

Categories

(Marketplace Graveyard :: Code Quality, defect, P2)

x86
macOS
defect

Tracking

(Not tracked)

RESOLVED FIXED
2013-06-13

People

(Reporter: andy+bugzilla, Assigned: ashort)

References

Details

(Whiteboard: [qa-])

Django cache machine uses the django contrib user object to do look ups, meaning it doesn't use cache machine at all. We could chop one SQL query per authenticated request if we used UserProfile instead.
Assignee: nobody → amckay
Priority: -- → P2
Target Milestone: --- → 2013-05-30
This gets messy quite quickly. I think we do this quite simply because the Django user object almost never changes. All changes are on user profile.

I think we should just manually cache the user object when we use it and then use that cache in the middleware. It will expire in 5 minutes, so the cache will kind of expire.
Target Milestone: 2013-05-30 → ---
Target Milestone: --- → 2013-06-06
Assignee: amckay → ashort
Target Milestone: 2013-06-06 → 2013-06-13
https://github.com/washort/zamboni/commit/4698aa7
see bug 881926 for the other cause of uncached db hits related to login.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Please add STRs or mark it as [qa-]
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.