Optimising HTTP Cache Hit Rate
I wrote a post over on our company blog titled Maximising Cache Hit Rates For Rest APIs. My team is responsible for producing (and supporting) the product API currently being adopted across the organisation. In it I detail a few techniques we've used to maximise our cache hit rate.
The TL;DR version:
- Require query parameters to be sorted alphabetically
- Require multi-value query parameters to be sorted
- Reject unrecognised query parameters
These restrictions serve to guard against accidental or unnecessary differences in the URLs for functionally identical queries. For the full details, please read the original post.