Observe que Last-Modified
headers são cabeçalhos de cache fracos. A preferência atual é usar Cache-Control
headers.
O Google tem um bom artigo sobre isso.
Otimizar o cache
Expires and Cache-Control: max-age. These specify the “freshness
lifetime” of a resource, that is, the time period during which the
browser can use the cached resource without checking to see if a new
version is available from the web server. They are "strong caching
headers" that apply unconditionally; that is, once they're set and the
resource is downloaded, the browser will not issue any GET requests
for the resource until the expiry date or maximum age is reached.
Last-Modified and ETag. These specify some characteristic about the
resource that the browser checks to determine if the files are the
same. In the Last-Modified header, this is always a date. In the ETag
header, this can be any value that uniquely identifies a resource
(file versions or content hashes are typical). Last-Modified is a
"weak" caching header in that the browser applies a heuristic to
determine whether to fetch the item from cache or not. (The heuristics
are different among different browsers.) However, these headers allow
the browser to efficiently update its cached resources by issuing
conditional GET requests when the user explicitly reloads the page.
Conditional GETs don't return the full response unless the resource
has changed at the server, and thus have lower latency than full GETs.
Eu recomendo usar Cache-Control
ou Expires
headers conforme necessário, pois são cabeçalhos de cache strongs. Alguns sistemas ignoram as datas da última modificação.
Você pode usar uma ferramenta como curl
ou link para verificar os cabeçalhos.