Closed Bug 1088361 Opened 10 years ago Closed 10 years ago

Allow clients to choose a greater max-age than 180s for the API responses

Categories

(Marketplace Graveyard :: API, defect, P2)

defect

Tracking

(Not tracked)

VERIFIED FIXED
2014-10-28

People

(Reporter: mat, Assigned: mat)

References

Details

(Keywords: perf)

Fireplace already sends cache=1 on some API requests, because it knows it can be cached. In some cases fireplace is also in a good position to know that a greater max-age would work just fine, so the API should allow the clients to choose a great timeout.

This is sort of the fine-grained version of bug 957383, but still using query parameters for now to circumvent issues with the CDN and Vary.
Blocks: 1088362
Fixed in https://github.com/mozilla/zamboni/commit/d98306db07d9b81e4ef8f5a1db0253eb920b4701

QA:
For now this should not have any impact on existing code. So, just check that it's still working correctly:
- Clear your browser cache
- Load marketplace with developer tools network tab opened
- Look in XHR for a request made to /api/v2/feed/get/?cache=1&lang=fr&limit=10&region=fr&vary=0
- Check that this request has a header Cache-Control: must-revalidate, max-age=180
- Reload the page
- Check that it displays correctly and the request is no longer present (because it has been cached by the browser for 3 minutes)
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Verified as fixed in FF36(Win7) in marketplace-dev.allizom.org using the steps from comment 1. 
Closing.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.