
12
Chapter 3
Web Proxy Caching
5. If the object is not in the cache (a cache miss) or the server indicates that the cached copy is no longer valid,
Traffic Server gets the document from the origin server, simultaneously streaming it to the user and the
cache (Figure 3-2.). Subsequent requests for the object will be served faster.
Figure 3-2. A cache miss
Caching is more complex than the preceding overview suggests. In particular, the overview does not answer
these questions:
•
How does Traffic Server ensure freshness?
•
How does Traffic Server serve correct HTTP alternates?
•
How does Traffic Server treat requests for objects that cannot or should not be cached?
The following sections discuss these questions.
Ensuring cached object freshness
Traffic Server handles object freshness differently depending on protocol.
Revalidating HTTP objects
If an HTTP object is stale, Traffic Server 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; Traffic Server resets its freshness limit and serves the object.
•
A new copy of the object is available; Traffic Server 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; Traffic Server does not serve the cached copy.
•
The origin server does not respond to the revalidation query. The Traffic Server serves the stale object
along with a
111 Revalidation Failed
warning.
HTTP
Web documents support optional author-specified expiration dates. Traffic Server 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.
FTP
FTP documents stay in the cache for a time period specified in the Freshness section of
the Cache page in Traffic Manager’s Configure Mode.
NNTP
News articles are refreshed each time Traffic Server polls parent news servers for changes
in group lists, article overview lists, and article updates. See
Maintaining the cache:
updates and feeds‚ on page 19
.
request
a cache miss
Traffic Server simultaneously caches
and serves the document to the client
Traffic Server
1
2
3
client
cache
local
server
or
igin
miss