Product Documentation

Default settings for the integrated cache

The Citrix ADC integrated cache feature provides built-in policies with default settings as well as initial settings for the Default content group. The information in this section defines the parameters for the built-in policies and Default content group.

Default caching policies

The integrated cache has built-in policies. The Citrix ADC appliance evaluates the policies in a particular order, as discussed in the following sections.

You can override these built-in policies with a user-defined policy that is bound to a request-time override or response-time override policy bank.

Note If you configured policies prior to release 9.0 and specified the -precedeDefRules parameter when binding the policies, they are automatically assigned to override-time bind points during migration.

View default policies

The built-in policy names start with an underscore (_). You can view the built-in policies from the command line and the administrative console using the show cache policy command.

Default request policies

You can override the following built-in request time policies by configuring new policies and binding them to the request-time override processing point. In the following policies, note that the MAY_NOCACHE action stipulates that the transaction is cached only when there is a user-configured or built-in CACHE directive at response time.

The following policies are bound to the _reqBuiltinDefaults policy label. They are listed in priority order.

Do not cache a response for a request that uses any method other than GET.

The policy name is _nonGetReq. The following is the policy rule:

!HTTP.REQ.METHOD.eq(GET)

Set a NOCACHE action for a request with header value that contains If-Match or If-Unmodified-Since.

The policy name is _advancedConditionalReq. The following is the policy rule:

HTTP.REQ.HEADER("If-Match").EXISTS || HTTP.REQ.HEADER("If-Unmodified-Since").EXISTS

Set a MAY_NOCACHE action for a request with the following header values: Cookie, Authorization, Proxy-authorization or a request which contains the NTLM or Negotiate header.

The policy name is _personalizedReq. The following is the policy rule:

HTTP.REQ.HEADER("Cookie").EXISTS || HTTP.REQ.HEADER("Authorization").EXISTS || HTTP.REQ.HEADER("Proxy-Authorization").EXISTS || HTTP.REQ.IS_NTLM_OR_NEGOTIATE

Default response policies

You can override the following default response-time policies by configuring new policies and binding them to the response-time override processing point.

The following policies are bound to the _resBuiltinDefaults policy label and are evaluated in the order in which they are listed:

  1. Do not cache HTTP responses unless they are of type 200, 304, 307, 203 or if the types are between 400 and 499 or between 300 and 302.

    The policy name is _uncacheableStatusRes. The following is the policy rule:

    !((HTTP.RES.STATUS.EQ(200)) || (HTTP.RES.STATUS.EQ(304)) || (HTTP.RES.STATUS.BETWEEN(400,499)) || (HTTP.RES.STATUS.BETWEEN(300, 302)) || (HTTP.RES.STATUS.EQ(307))|| (HTTP.RES.STATUS.EQ(203)))

  2. Do not cache an HTTP response if it has a Vary header with a value of anything other than Accept-Encoding.

    The compression module inserts the Vary: Accept_Encoding header. The name of this expression is _uncacheableVaryRes. The following is the policy rule:

    ((HTTP.RES.HEADER("Vary").EXISTS) && ((HTTP.RES.HEADER("Vary").INSTANCE(1).LENGTH > 0) || (!HTTP.RES.HEADER("Vary").STRIP_END\_WS.SET_TEXT_MODE(IGNORECASE).eq("Accept-Encoding"))))

  3. Do not cache a response if its Cache-Control header value is No-Cache, No-Store, or Private, or if the Cache-Control header is not valid.

    The policy name is _uncacheableCacheControlRes. The following is the policy rule:

    ((HTTP.RES.CACHE\_CONTROL.IS\_PRIVATE) || (HTTP.RES.CACHE\_CONTROL.IS\_NO\_CACHE) || (HTTP.RES.CACHE\_CONTROL.IS\_NO\_STORE) || (HTTP.RES.CACHE\_CONTROL.IS\_INVALID))

  4. Cache responses if the Cache-Control header has one of the following values: Public, Must-Revalidate, Proxy-Revalidate, Max-Age, S-Maxage.

    The policy name is _cacheableCacheControlRes. The following is the policy rule:

    ((HTTP.RES.CACHE_CONTROL.IS_PUBLIC) || (HTTP.RES.CACHE_CONTROL.IS_MAX_AGE) || (HTTP.RES.CACHE_CONTROL.IS_MUST_REVALIDATE) || (HTTP.RES.CACHE_CONTROL.IS_PROXY_REVALIDATE) || (HTTP.RES.CACHE_CONTROL.IS_S_MAXAGE))

  5. Do not cache responses that contain a Pragma header.

    The name of the policy is _uncacheablePragmaRes. The following is the policy rule:

    HTTP.RES.HEADER("Pragma").EXISTS

  6. Cache responses that contain an Expires header.

    The name of the policy is _cacheableExpiryRes. The following is the policy rule:

    HTTP.RES.HEADER("Expires").EXISTS

  7. If the response contains a Content-Type header with a value of Image, remove any cookies in the header and cache it.

    The name of the policy is _imageRes. The following is the policy rule:

    HTTP.RES.HEADER("Content-Type").SET_TEXT_MODE(IGNORECASE).STARTSWITH("image/")

    You could configure the following content group to work with this policy:

    add cache contentgroup nocookie -group -removeCookies YES

  8. Do not cache a response that contains a Set-Cookie header.

    The name of the policy is _ personalizedRes. The following is the policy rule:

    HTTP.RES.HEADER(“Set-Cookie”).EXISTS   HTTP.RES.HEADER(“Set-Cookie2”).EXISTS

Restrictions on default policies

You cannot override the following built-in request time policies with user-defined policies.

These policies are listed in priority order.

  1. Do not cache any responses if the corresponding HTTP request lacks a GET or POST method.
  2. Do not cache any responses for a request if the HTTP request URL length plus host name exceeds 1744 byes.
  3. Do not cache a response for a request that contains an If-Match header.
  4. Do not cache a request that contains an If-Unmodified-Since header.

Note This is different from the If-Modified-Since header.

5. Do not cache a response if the server does not set an expiry header.

You cannot override the following built-in response time policies. These policies are evaluated in the order in which they are listed:

  1. Do not cache responses that have an HTTP response status code of 201, 202, 204, 205, or 206.
  2. Do not cache responses that have an HTTP response status code of 4xx, with the exceptions of status codes 403, 404, and 410.
  3. Do not cache responses if the response type is FIN terminated, or the response does not have one of the following attributes: Content-Length, or Transfer-Encoding: Chunked.
  4. Do not cache the response if the caching module cannot parse its Cache-Control header.

Initial settings for the default content group

When you first enable integrated caching, the Citrix ADC appliance provides one predefined content group named the Default content group. For detailed information, see Default content group settings table.