"As a Client Developer, I want to use a client-side cache, so that I can speed up data access and reduce my network access times."
We've put off supporting client-side cache in the MW REST API so far. This technique is great for reducing API calls and speeding up apparent performance for clients. Browser-based clients and some HTTP library users will get this built-in automatically.
To support client-side cache, we need to:
- Emit Last-Modified header (harder but more widely used)
- Emit ETag header (easier but less widely used)
- Emit Expires header (rarely applicable, but very useful)
- Support If-Modfied-Since for requests
- Support If-None-Match for requests
The Handler class has methods to get last modified date and etag, but the REST Router class doesn't use them.
It would be good to get this functionality into the API now, while we're still low-traffic and it's not an emergency.
One good potential endpoint for enhancing with this is GET /revision/{id}/bare, since revisions are mostly immutable.
Paths:
- [ ] /user/{name}/hello
- /v1/page/{title}/history
- /v1/page/{title}/history/counts/{type}
- /v1/revision/{from}/compare/{to}
- /v1/revision/{id}/bare
- /coredev/v0/page/{title}/
- /coredev/v0/page/{title}/links/language
- /coredev/v0/page/{title}/links/media
- /coredev/v0/file/{title}
- [ ] /coredev/v0/search/page