Revalidating objects, Http object freshness tests – Intel 1520 User Manual

Page 128

Advertising
background image

116

Intel NetStructure Cache Appliance Administrator’s Guide

HTTP

Web documents support optional author-specified expiration dates. The appliance
adheres to these expiration dates; otherwise it picks an expiration date based on
how frequently the document is changing and on administrator-chosen freshness
guidelines. In addition, documents can be revalidated, checking with the server if
a document is still fresh.

Revalidating objects

If an HTTP object is stale, the Intel NetStructure Cache Appliance revalidates the
object. A revalidation is a query to the origin server that asks if the object is
unchanged. The result of a revalidation could be:

✔ The object is still fresh; the appliance resets its freshness limit and serves the

object.

✔ A new copy of the object is available; the appliance caches the new object,

replacing the stale copy, and serves the object to the user simultaneously.

✔ The object no longer exists on the origin server; the appliance does not serve

the cached copy.

✔ The origin server does not respond to the revalidation query. The appliance

serves the stale object along with a

111 Revalidation Failed

warning.

HTTP object freshness tests

Here’s how the Intel NetStructure Cache Appliance determines an HTTP
document’s freshness:

Expires header test:

Some documents come with

Expires

headers or

max-age

headers that

explicitly define how long the document can be cached. A simple comparison
of the current time with the expiration time determines whether or not the
document is fresh.

Last-Modified / Date header test:

If no expiration information exists, the appliance can use the

Last-

Modified

and

Date

headers to estimate a freshness limit. The

Last-

Modified

header indicates how long ago a document was modified. If a

document was last modified two years ago, it is unlikely to suddenly change,
so the appliance can cache it safely for a while. But if the document just
changed five minutes ago, it might be quite volatile, and the appliance should
not cache it very long. The appliance stores an object for some percentage of
the time (F) that elapsed since the object last changed. The percentage is 10%
by default:

In the above formula, the

Date

header provides the date the object was sent

to the appliance and the

Last-Modified

header provides the date the object

was last modified on the origin server.

freshness limit = F * (Date - Last-Modified)

Advertising