Page MenuHomePhabricator

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

Description

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.

AC

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

Event Timeline

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

https://gerrit.wikimedia.org/r/360778

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

https://gerrit.wikimedia.org/r/360778