In this example, the expiration date is later than the current date, so the cache entry is still valid and will be used. If the “Expires” header is absent, AVB will send conditional HTTP GET with If-Modified-Since and If-None-Match headers to check if the resources has been updated.
HTTP/1.1 200 OK
Date: Tue, 23 May 2006 22:30:45 GMT
Server: Apache/2.0.46 (Red Hat)
Last-Modified: Tue, 28 Feb 2006 17:43:35 GMT
ETag: "6090ec-29b-5dd53fc0"
Accept-Ranges: bytes
Content-Length: 667
Cache-Control: max-age=86400
Expires: Wed, 24 May 2006 22:30:45 GMT
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/xml
In this example due to the no-cache settings and 0 value for expiration, no entry will be added to the cache for future requests thus forcing a fetch of the document for each request.
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=65F51939A8D2D86E2D31919FFF5A2DED; Path=/pizza
Cache-Control: no-cache
Pragma: no-cache
Expires: 0
Content-Type: text/xml;charset=UTF-8
Date: Tue, 23 May 2006 23:14:53 GMT
Connection: close