You can configure the
NetScaler appliance to always consult the origin server before serving a stored
response. This is known as Poll Every Time (PET). When the NetScaler appliance
consults the origin server and the PET response has not expired, a full
response from the origin server does not overwrite cached content. This
property is useful when serving client-specific content.
After a PET response
expires, the NetScaler appliance refreshes it when the first full response
arrives from the origin server.
The Poll Every Time (PET)
function works as follows:
- For a cached response that
has validators in the form of an ETag or a Last-Modified header, if the
response expires it is automatically marked PET and cached.
- You can configure PET for a
If you configure a content
group as PET, every response in the content group is marked PET. The PET
content group can store responses that do not have validators. Responses that
are automatically marked PET are always expired. Responses that belong to a PET
content group can expire after a delay, based on how you configure the content
Two types of requests are
affected by polling:
- Conditional Requests: A
client issues a conditional request to ensure that the response that it has is
the most recent copy.
A user-agent request for a
cached PET response is always converted to a conditional request and sent to
the origin server. A conditional request has validators in If-Modified-Since or
If-None-Match headers. The If-Modified-Since header contains the time from the
Last-Modified header. An If-None-Match header contains the response's ETag
If the client's copy of the
response is fresh, the origin server replies with 304 Not Modified. If the copy
is stale, a conditional response generates a 200 OK that contains the entire
Requests: A non-conditional request can only generate a 200 OK that
contains the entire response.
The following table
summarizes response types based on the origin server's response
Table 3. How Responses
Are Affected by Poll Every Time
Origin Server Response
Send the full response
The origin server sends the
response as-is to the client. If the cached response has expired, it is
304 Not Modified
The following header values
in the 304 response are merged with the cached response and the cached response
is served to the client:
- Cache-Control header
Max-Age and S-Maxage tokens
400 Bad Request
405 Method Not Allowed
406 Not Acceptable
407 Proxy Authentication
The origin's response is
served as-is to the client. The cached response is not changed.
Any other error response,
for example, 404 Not Found
The origin's response is
served as-is to the client. The cached response is removed.
Note: The Poll
Every Time parameter treats the affected responses as non-storable.