Been running into a weird issue with all of our Drupal 8 websites, hosted on different servers.
The pages are caching correctly, x-drupal-cache header shows a HIT as well. The page however has it's headers set to 200, instead of 304. None of the sites are live yet, so i can't provide a link.
- HTTP/1.1 200 OK
- Date: Fri, 18 Mar 2016 20:09:41 GMT
- Server: Apache/2.4.7 (Ubuntu)
- Cache-Control: max-age=900, public
- Expires: Sun, 19 Nov 1978 05:00:00 GMT (Dries' birthdate? O.o)
- Last-Modified: Fri, 18 Mar 2016 19:49:21 GMT
- Vary: Cookie,Accept-Encoding
- X-Drupal-Cache: HIT
- Keep-Alive:timeout=5, max=100
- Connection: Keep-Alive
- Content-Type: text/html;
Debugging the code Drupal uses to serve pages with 304 headers ( lines 165 to 170 of PageCache.php ) I have found that HTTP_IF_MODIFIED_SINCE and HTTP_IF_NONE_MATCH are not being set.