Applies To:

Show Versions Show Versions

Manual Chapter: Managing Requests and Responses with Lifetime Rules
Manual Chapter
Table of Contents   |   << Previous Chapter   |   Next Chapter >>

Overview: Lifetime rules

The length of time that a client browser, upstream device, or WebAccelerator™ system keeps compiled content in its cache before refreshing it is called content lifetime. Content lifetime is expressed in the form of a time to live (TTL) value, and can vary for each cached response.

When content is in cache longer than its TTL value, the WebAccelerator system considers the content expired. When the WebAccelerator system receives a request for expired content, it sends that request to the origin web servers for fresh content, replaces the expired cached content with the fresh response, and then responds to the request.

Lifetime managed requests

The HTTP Cache-Control version 1.1 header specification identifies headers that are used to control web entities, such as the WebAccelerator™ system. Clients that are HTTP version 1.1-compliant are capable of providing request headers, which contain directives that control caching behavior.

If the Honor Headers In Request setting is enabled, the WebAccelerator system obeys any HTTP Cache-Control header directives configured for the client. If this setting is enabled and the client includes an HTTP Cache-Control header directive that indicates the client is not willing to accept content served from a cache, the WebAccelerator system refreshes the corresponding cached content for the request, even if that content has not yet expired.

If you want to use HTTP lifetime headers, but want to be able to serve valid content that the WebAccelerator system cached when applicable, you can move the no_cache list item for Honor Headers In Request, in the WebAccelerator Cache Settings area, from the Selected list to the Available list.

Lifetime managed responses

WebAccelerator™ system lifetime rules only apply to responses; they are not relevant to requests. The WebAccelerator system applies lifetime rules only to responses that it receives from the origin web server. You can define how the WebAccelerator system manages cached content for responses, through the following lifetime rule settings.

Lifetime Rule Settings Description
WebAccelerator Cache Settings These settings specify how long the WebAccelerator system retains cached content, how long the WebAccelerator system serves cached content if the origin web server is not available, and when to expire cached content. These settings also specify whether the WebAccelerator system honors the TTL values provided with the headers in the request and provided with the headers sent from the origin web server.
Client Cache Settings These settings specify whether the client browser (or other upstream device) should store content locally and, if so, the maximum time the browser should store content. They also specify whether the WebAccelerator system should honor any existing no-cache directives, use custom Cache-Control directives, or replace origin web server directives with a no-cache directive.

These settings apply to any HTTP response that matches to a leaf node for a specific acceleration policy, for which the option is set.

About specifying the amount of time to store cached content

If you have certain content that rarely changes, you can increase the amount of time that the WebAccelerator™ system and client store that content. This reduces the load on your origin web server and increases the perceived performance of your site.

The value under WebAccelerator Cache Settings for the Maximum Age setting determines how long the WebAccelerator system stores cached content. The values under Client Cache Settings for the Maximum Age and S-Max Age settings determine how long the client stores cached content. The S-Max Age setting can only be used for a shared cache. When the limit is met, the WebAccelerator system or client browser requests fresh content from the origin web server.

Note: Specified Maximum Age and S-Max Age header settings are used only when they are not provided in a response from the origin web server, or when they are not configured to be honored by the WebAccelerator system.

Specifying the amount of time for the WebAccelerator system to store cached content

Under WebAccelerator Cache Settings, the Maximum Age can be configured either as a heuristic value or as a specific amount of time.

For Use HTTP Lifetime Heuristic, the %Heuristic value is a percentage of time that the WebAccelerator system uses to calculate the lifetime for cached content from the last time it was refreshed. To determine the lifetime based on this setting, the WebAccelerator system reviews the value for the HTTP LAST_MODIFIED response header, and computes the cache expiration according to the value specified for the %Heuristic percentage. The formula for this calculation is as follows: ((current time - HTTP LAST_MODIFIED response header = X) * (lifetime heuristic)) + (current time) = content expiration

For example, if the HTTP LAST_MODIFIED response header specifies that the object was last modified at 9:00 a.m., the current time is 11:00 a.m., and the %Heuristic setting is a value of 50, then the content expiration is 12:00 p.m.

The Use HTTP Lifetime Heuristic setting is only in effect if you are using HTTP headers to identify content lifetime. Use this setting only if you want to use the HTTP LAST_MODIFIED response header to set compiled response TTL values.

Note: If the origin web server does not provide an HTTP LAST_MODIFIED response header or value, the WebAccelerator system will use an internal value to calculate the lifetime for cached content.

Clearing the Use HTTP Lifetime Heuristic check box enables you to configure a specific amount of time for the Maximum Age value, with units of time ranging from Seconds through Days. Setting the Maximum Age value to 0 initiates a refresh for each request, preventing the WebAccelerator system from caching the associated content. A Maximum Age setting of 0 can significantly reduce the load on the origin web server, especially for large files and frequently accessed files, because the WebAccelerator system initiates a refresh for each request, instead of full GET request.

Specifying the amount of time for a client to store cached content

Under Client Cache Settings, the Preserve Origin Web Server headers/directives to downstream devices option and the Custom Cache-Control Directives option use the Maximum Age and S-Max Age settings to configure a specific amount of time, with units of time ranging from Seconds through Days.

Setting the Maximum Age or S-Max Age value to 0 initiates a refresh for each request, preventing the client from caching the associated content.

About serving cached content when origin web server content is unavailable

The WebAccelerator™ system can continue to serve content from its cache when an origin web server responds with specific HTTP status codes. By specifying a Stand-in Period and a Stand-in Code, you can enable the WebAccelerator system to provide stale content for those specific conditions.

Stand-in Period

In the WebAccelerator Cache Settings area, the value for the Stand-in Period setting identifies how long the WebAccelerator system continues to serve content from cache if the origin web server responds to the WebAccelerator system's requests for fresh content with an HTTP 404 (page not found), 500 (internal server error), or 504 (service unavailable) response. If the WebAccelerator system cannot retrieve fresh content from the origin web server after the stand-in period expires, or if the stand-in period is undefined, the WebAccelerator system provides the HTTP 404, 500, or 504 response from the origin web server.

The stand-in period requires an origin web server response. If the origin web server is down, and provides no response, the stand-in period is not applied.

Stand-in Code

If network failure occurs, or if the origin web server responds with certain error codes, the WebAccelerator system cannot validate cache with the origin web server. However, you can configure the WebAccelerator system to serve stale content during these conditions, by using the WebAccelerator Cache Settings Stand-in Code settings. The WebAccelerator system serves invalid content to the client if the origin web server response code meets these conditions. If a stand-in response code is not configured, the WebAccelerator system uses default values (404, 500, or 504) to determine whether it is serving stale content.

About preserving origin web server headers and directives to downstream devices

When you select the Preserve origin web server headers/directives to downstream devices option, under Client Cache Settings, the WebAccelerator™ system directs the client browser to store content locally on the client, in accordance with the cache directives that are defined in the HTTP headers sent from the origin web server.

To preserve a cache control directive and send it to downstream devices, you must include the directive for Origin Web Server Headers in the Selected list.
Note: The WebAccelerator system inserts an Expires header into the response when expires is selected, if the origin web server does not include an Expires header. It does not insert an Expires header into the response when all is selected, if the origin web server does not include an Expires header.
You can also specify a Maximum Age or an S-Max Age value to use when these directives are not specified by the origin web server. The WebAccelerator system uses the specified Maximum Age and S-Max Age value only when the origin web server value is not provided.

When you add Cache-Control extensions to the Custom Cache Extensions list, the WebAccelerator system preserves the specified extensions to send to the client. Unless specified, any Cache-Control extensions from the origin web server are removed from the response.

Custom Cache-Control directives

When you select the Custom Cache-Control directives option in Client Cache Settings, the WebAccelerator™ system enables you to do the following:

  • Specify which origin web server headers to preserve and send to the client.
  • Apply specified Maximum Age and S-Max Age headers to the specified origin web server headers.
    Note: The specified Maximum Age and S-Max Age headers are used only when they are not provided by the origin web server.
  • Preserve Cache-Control extension headers sent from the origin web server.

    When you add Cache-Control extension headers to the Custom Cache Extensions list, the WebAccelerator system preserves the specified extensions to send to the client. Unless specified, any Cache-Control extensions from the origin web server are removed from the response.

About replacing origin web server headers and directives with a no-cache directive

In Client Cache Settings, when you select the Replace Origin Web Server Headers/Directives with no-cache option, the WebAccelerator™ system inserts a no-cache directive into the HTTP Cache-Control header that is returned from the origin web server. This header instructs the client browser to not cache content.

When you add Cache-Control extensions to the Custom Cache Extensions list, the WebAccelerator system preserves the specified extensions to send to the client. Unless specified, any Cache-Control extensions from the origin web server are removed from the response.

Table of Contents   |   << Previous Chapter   |   Next Chapter >>

Was this resource helpful in solving your issue?




NOTE: Please do not provide personal information.



Incorrect answer. Please try again: Please enter the words to the right: Please enter the numbers you hear:

Additional Comments (optional)