Steps to replicate the issue:
- Retrieve HTML from a REST API endpoint, e.g: https://en.wikipedia.org/w/rest.php/v1/page/Main_Page/html?redirect=no
What happens?:
Most responses from WMF sites contain an ETag, some do not.
Notes:
It was initially thought that the behaviour depends on whether or not a query parameter is present, but that does not seem to be the case. The first step to resolving the issue will be to understand what causes the ETag to be missing sometimes. It is suspected that the ETag is lost along the way through layers of frontend caches.
Note that frentend caching should currently not apply to responses from the page HTML endpoint: These endpoints do not (yet) see heavy loads, and requests are spread evently among all pages, so the cache hit rate would be low. This is likely to change once we see more traffic on thise endpoints, and can observe access patterns that allows us to determin effective caching parameters.