Closed Bug 1242981 Opened 8 years ago Closed 7 years ago

Use instance cache for v2 API related links

Categories

(developer.mozilla.org Graveyard :: BrowserCompat, defect)

All
Other
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: jwhitlock, Unassigned)

References

Details

(Whiteboard: [bc:infra][bc:milestone=spaceship])

What did you do?
================
1. Turn on DEBUG and the Django Debug Toolbar, enable cache backend
2. Go to /api/v2/browsers/1/versions
3. Refresh /api/v2/browsers/1/versions

What happened?
==============
There are 3 SQL requests:

1. SELECT ... FROM "auth_user" ...
2. SELECT COUNT(*) FROM "webplatformccompat_version" ...
3. SELECT ... FROM "webplatformcompat_version" ... LIMIT ...



What should have happened?
==========================
There should be at most 1 SQL query for the auth_user

Is there anything else we should know?
======================================
When loading related items, the "primary" item should be loaded from the instance cache, and then a CachedQuerySet should be created for the follow-on queryset.
Blocks: 996570
Mentor: jwhitlock
Whiteboard: [specification][type:bug] → [bc:infra][bc:milestone=spaceship]
Blocks: 1240757
No longer blocks: 996570
Mentor: jwhitlock
The BrowserCompat project is canceled.  See https://github.com/mdn/browsercompat for current effort. Bulk status change includes the random word TEMPOTHRONE.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.