Page MenuHomePhabricator

Document why Page Previews doesn't cache API responses
Closed, ResolvedPublic1 Estimated Story Points


To some extent, T166605: Loading links content only once on hover [Proposal] and T161284: Minimise incidental HTTP requests caused by Page Previews both suggest that API responses should be cached in-memory. However, Page Previews (PP) uses APIs that can be – and are! – cached by the browser:

… PP leverages the browser's cache rather than maintaining its own. We rely on Grade A browsers implementing HTTP caching correctly and their vendors making accessing them as efficient as possible in order to avoid incurring the incidental complexity of writing our own cache in JavaScript. I think this is reasonable.

This reads like an architecture decision and should be documented as such.


  • An ADR is added to the PP codebase explaining this decision.

Event Timeline

phuedx created this task.Jun 6 2017, 9:35 AM
Restricted Application added subscribers: TerraCodes, Aklapper. · View Herald TranscriptJun 6 2017, 9:35 AM
phuedx renamed this task from Document why Page Previews doesn't cache responses in memory to Document why Page Previews doesn't cache API responses.Jun 6 2017, 9:36 AM
phuedx updated the task description. (Show Details)
Jdlrobson set the point value for this task to 1.Jun 7 2017, 4:32 PM
ovasileva triaged this task as Medium priority.Jun 7 2017, 4:33 PM

Change 360778 had a related patch set uploaded (by Bmansurov; owner: Bmansurov):
[mediawiki/extensions/Popups@master] Document decision to cache requests

Change 360778 merged by jenkins-bot:
[mediawiki/extensions/Popups@master] Document decision to cache requests

bmansurov removed bmansurov as the assignee of this task.Jun 22 2017, 1:05 PM
bmansurov added a subscriber: bmansurov.