API Design · Senior · Question 69 of 75
What's the risk of caching authenticated API responses at a CDN?
- ✓Correct answer: Without correct keys (
Vary, cache keys including the user or token) orprivate/no-store, one user's data can be served to another - 2CDNs can't cache JSON
- 3Authenticated responses are always cached safely
Explanation
Cache shared, non-personalized data at the edge; personalize with separate requests or client-side merging.