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 BIG-IP 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 BIG-IP system considers the content expired. When the BIG-IP 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.

Configuring lifetime cache settings

The WebAccelerator Cache Settings and Client Cache Settings enable you to specify lifetime and privacy settings for origin web server and client objects that are cached by the BIG-IP and downstream devices.
  1. On the Main tab, click Acceleration > Web Application > Policies .
    The Policies screen displays a list of existing acceleration policies.
  2. Click the name of a user-defined acceleration policy.
  3. Click a node in the Policy Tree.
  4. From the Matching Rules menu, choose Acceleration Rules.
  5. On the menu bar, click Lifetime.
  6. Configure the system to honor headers in a request from a client.
    1. Select the Honor Headers In Request check box.
    2. For the Request Headers setting, select a header in the Available field, and move the header to the Selected field using the Move button.
  7. Configure the system to honor headers from an origin web server.
    1. Select the Honor Headers From Origin Web Server check box.
    2. For the Origin Web Server Headers setting, select a header in the Available field, and move the header to the Selected field using the Move button.
      Note: The BIG-IP 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.
  8. Do one of the following to specify the maximum age.
    • Select the Use HTTP Lifetime Heuristic check box, and type a number in the %Heuristic field to specify a heuristic percentage based on the HTTP Last-Modified header.
    • Clear the Use HTTP Lifetime Heuristic check box, type a number for the duration in the Maximum Age field, and select a unit of time from the list.
  9. In the Stand-in Period field, type a number for the duration, and select a unit of time from the list.
  10. For the Stand-in Codes setting, select a code entry in the Available field, and move the code entry to the Selected field using the Move button.
  11. Select one of the following Client Cache Settings options, and configure as applicable.
    • Preserve Origin Web Server headers/directives to downstream devices.
    1. In the Maximum Age field, type a number for the duration, and select a unit of time from the list.
    2. In the S-Max Age field, type a number for the duration, and select a unit of time from the list.
    3. In the Custom Cache Extensions Add field, type an extension, and click Add.
      The extension appears in the Custom Cache Extensions list.
    • Custom Cache-Control Directives.
    1. In the Maximum Age field, type a number for the duration, and select a unit of time from the list.
    2. In the S-Max Age field, type a number for the duration, and select a unit of time from the list.
    3. In the Custom Cache Extensions Add field, type an extension, and click Add.
      The extension appears in the Custom Cache Extensions list.
    • Replace Origin Web Server Headers/Directives with no-cache.
    1. In the Custom Cache Extensions Add field, type an extension, and click Add.
      The extension appears in the Custom Cache Extensions list.
The lifetime and privacy settings are configured for client and origin web server objects that are cached by the BIG-IP and downstream devices.

An example lifetime rule

For this example site, you have three top-level nodes on the Policy Tree as follows:
  • Home. This branch node specifies the rules related to the home page.
  • Applications. This branch node specifies the rules related to the applications for the site, with the following leaf nodes:
    • Default. This leaf node specifies the rules related to non-search related applications.
    • Search. This leaf node specifies the rules related to your site's search application.
  • Images. This branch node specifies the rules related to graphics images.

Example of lifetime rule for the Home node

You change your site's content approximately every 4 hours. You want the BIG-IP system to cache content for no longer than 24 hours. If the origin web servers are not responding for request for fresh content, you are willing to allow the BIG-IP system to serve content that is 8 hours old (or twice the age of the content).

To ensure that you can manage content invalidation, you do not want to rely solely on the browser's local cache settings for the home node, so you do not have a minimum time set for content residing in the browser cache before performing a check for content freshness.

  1. On the Lifetime tab for the Home node, select the Honor Headers From Origin Web Server check box.
  2. For the Origin Web Server Headers setting, select expires in the Available field, and move the header to the Selected field using the Move button.
  3. Specify a Maximum Age of 24 Hours and a Stand-in Period of 8 Hours.
  4. Leave all other options at the default settings.
An example Home branch node lifetime rule is configured.

An example lifetime rule for the Default leaf node

The content served for your general applications changes about once every 4 hours. You use an invalidations rule to force a refresh when content changes, but you do not want content to remain in the system's cache for more than 5 hours without a refresh.

If the origin web servers are not responding to the BIG-IP system's refresh requests, you are willing to allow the BIG-IP system to serve content that is 8 hours old (or twice the age of the content).

  1. Create a lifetime rule for the Default leaf node.
  2. Select the Honor Headers From Origin Web Server check box.
  3. For the Origin Web Server Headers setting, select expires in the Available field, and move the header to the Selected field using the Move button.
  4. Specify a Maximum Age of 5 Hours and a Stand-in Period of 8 Hours.
  5. Leave all other options at the default settings.
An example Default leaf node lifetime rule is configured.

An example lifetime rule for the Search leaf node

Your search application returns data that has various expiration times; some content expires in as little as 10 minutes, and some content expires at 8 hours. You intend to use the HTTP Cache-Control Expire header max-age directive to identify the cache time for content served by the search application.
  1. On the Lifetime tab for the Search leaf node, select the Honor Headers From Origin Web Server check box.
  2. For the Origin Web Server Headers setting, select expires in the Available field, and move the header to the Selected field using the Move button.
  3. Specify a Maximum Age of 8 Hours and a Stand-in Period of 10 Hours.
  4. Leave all other options at the default settings.
An example Search leaf node lifetime rule is configured.

An example lifetime rule for the Images node

You change the images for your applications approximately every 4 hours. You want the BIG-IP system to cache images for no longer than 24 hours and, if the origin web servers are not responding to the BIG-IP system's refresh requests, you are willing to allow the BIG-IP system to serve images that are 8 hours old (or twice the age of the image).
  1. On the Lifetime tab for the Images node, select the Honor Headers From Origin Web Server check box.
  2. For the Origin Web Server Headers setting, select expires in the Available field, and move the header to the Selected field using the Move button.
  3. Specify a Maximum Age of 24 Hours and a Stand-in Period of 8 Hours.
  4. In the Client Cache Settings area, select the Custom Cache-Control Directives option, and specify a Maximum Age of 4 Days.
  5. Leave all other options at the default settings.
An example Images leaf node lifetime rule is configured.
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)