From my understanding of the caching mechanism, the response header Last-Modified
, request header If-Modified-Since
and etc has accuracy to the second, i.e. If-Modified-Since: Wed, 21 Oct 2015 07:28:00 GMT
, and thus subsecond modifications would undermine invalidation:
12:00:00.100 /path/to/resource updated to Version 1
12:00:00.200 GET /path/to/resource from client A
12:00:00.300 Response: Version 1 of the page with Last-Modified: 12:00:00
12:00:00.400 /path/to/resource updated to Version 2
12:00:00.500 GET /path/to/resource from client A with If-Modified-Since: 12:00:00
12:00:00.600 Response: 304 Not Modified
# and even after time passes
16:15:00.000 GET /path/to/resource from client A with If-Modified-Since: 12:00:00
16:15:00.100 Response: 304 Not Modified
And until the cache expires, the client would not ever get Version 2 of the page.
Is this actually the case? Should versions stored in the page always increase the last modified date of the page by one second?