But now the response's max-age has been exceeded, so the proxy
revalidates the response with the origin server:
GET /bar.html HTTP/1.1
If-None-Match: "abcde"
Host: foo.com
Connection: Meter
Meter: count=1/0
thus simultaneously fulfilling its duties to validate the response
and to report the one "use" that wasn't forwarded.
The origin server responds:
HTTP/1.1 304 Not Modified
Date: Fri, 06 Dec 1996 19:44:29 GMT
Cache-control: max-age=3600
Etag: "abcde"
so the proxy can use the original response to reply to the new
client; the proxy also zeros the use-count it associates with that
response.
RFC 2227 Hit-Metering and Usage-Limiting October 1997
Another client soon asks for the resource:
GET http://foo.com/bar.html HTTP/1.1
and the proxy sends the appropriate response.
After another few hours, the proxy decides to remove the cache entry.
When it does so, it sends to the origin server:
HEAD /bar.html HTTP/1.1
If-None-Match: "abcde"
Host: foo.com
Connection: Meter
Meter: count=1/0
reporting that one more use of the response was satisfied from the
cache.
6.2 Protecting against HTTP/1.0 proxies
An origin server that does not want HTTP/1.0 caches to store the
response at all, and is willing to have HTTP/1.0 end-system clients
generate excess GETs (which will be forwarded by HTTP/1.0 proxies)
could send this for its reply:
HTTP/1.1 200 OK
Cache-control: max-age=3600
Connection: meter
Etag: "abcde"
Expires: Sun, 06 Nov 1994 08:49:37 GMT
HTTP/1.0 caches will see the ancient Expires header, but HTTP/1.1
caches will see the max-age directive and will ignore Expires.
Note: although most major HTTP/1.0 proxy implementations observe
the Expires header, it is possible that some are in use that do
not. Use of the Expires header to prevent caching by HTTP/1.0
proxies might not be entirely reliable.
6.3 More elaborate examples
Here is a request from a proxy that is willing to hit-meter but is
not willing to usage-limit:
GET /bar.html HTTP/1.1
Host: foo.com
Connection: Meter
Meter: wont-limit
RFC 2227 Hit-Metering and Usage-Limiting October 1997
Here is a response from an origin server that does not want hit
counting, but does want "uses" limited to 3, and "reuses" limited to
6:
HTTP/1.1 200 OK
Cache-control: max-age=3600
Connection: meter
Etag: "abcde"
Expires: Sun, 06 Nov 1994 08:49:37 GMT
Meter: max-uses=3, max-reuses=6, dont-report
Here is the same example with abbreviated Meter directive names:
HTTP/1.1 200 OK
=17= |