Open Bug 1360616 Opened 8 years ago Updated 8 years ago

Cache country code responses for send-to-device widget

Categories

(www.mozilla.org :: Pages & Content, enhancement)

Production
enhancement
Not set
normal

Tracking

(Not tracked)

People

(Reporter: agibson, Unassigned)

Details

As per discussion in [1], showing the send-to-device widget on something like a /whatsnew page creates a lot of requests to the service. We may want to consider caching responses using something like local storage (e.g. for 30 days), to avoid repeat per-user requests. This may not help tremendously for /whatsnew pages that users only see once, but for other pages that use this widget it could still come in useful. [1] https://github.com/mozilla/bedrock/pull/4791
The caching code used by snippets is fairly complicated, but still might serve as inspiration: https://github.com/mozmar/snippets-service/blob/4323e511a1c9eb3564ab6242bad78288a3ff3a35/snippets/base/templates/base/includes/snippet.js
You need to log in before you can comment on or make changes to this bug.