Product Documentation

Configuring a Policy Bank for Caching

Sep 01, 2016

All of the policies that are associated with a particular bind point are collectively known as a policy bank. In addition to configuring priority levels for policies in a bank, you can modify the order of evaluation order in a bank by configuring Goto expressions. You can further modify the evaluation order by invoking an external policy bank from within the current policy bank. You can also configure new policy banks, to which you assign your own labels. Because such policy banks are not bound to any point in the processing cycle, they can be invoked only from within other policy banks. For convenience, policy banks whose labels do not correspond to a built-in bind point are called policy labels.

In addition to controlling order of policy evaluation by binding the policy and assigning a priority level, as described in "Binding Policies That Use the Default Syntax", you can establish the flow within a bank of policies by configuring a Goto expression. A Goto expression overrides the flow that is determined by the priority levels. You can also control the evaluation flow by invoking an external policy bank after evaluating an entry in the current bank. Evaluation always returns to the current bank after evaluation has completed for the external bank.

The following table summarizes the entries to control evaluation in a policy bank.

Table 1. Entries to Control Evaluation Flow in a Policy Bank

Attribute

Specifies

Name

The name of a policy, or, to invoke another policy bank without evaluating the policy, the keyword NOPOLICY.

You can specify NOPOLICY more than once in a policy bank, but you can specify a named policy only once.

Priority

An integer. The lower the integer, the higher the priority.

Goto Expression

Determines the next policy or policy bank to evaluate. You can provide one of the following values:

  • NEXT: Go to the policy with the next higher priority.
  • END: Stop evaluation.
  • USE_INVOCATION_RESULT: Applicable if this entry invokes another policy bank. If the final Goto in the invoked bank has a value of END, evaluation stops. If the final Goto is anything other than END, the current policy bank performs a NEXT.
  • Positive number: Priority number of the next policy to be evaluated.
  • Numeric expression: Expression that produces the priority number of the next policy to be evaluated.

The Goto can only proceed forward in a policy bank.

Omitting the Goto expression is the same as specifying END.

Invocation Type

Designates a policy bank type. The value can be one of the following:

  • Request Vserver: Invokes request-time policies that are associated with a virtual server.
  • Response Vserver: Invokes response-time policies that are associated with a virtual server.
  • Policy label: Invokes another policy bank, as identified by the policy label for the bank.

Invocation Name

Name of a virtual server or a policy label, depending on the value that you specified for the Invocation Type.

The integrated cache has two built-in policy labels, and you can configure additional policy labels:

  • _reqBuiltInDefaults: This policy label is invoked from the request-time default bind point.
  • _resBuiltInDefaults: This policy label is invoked from the response-time default bind point.
Note: For information about creating policy labels, see "Configuring a Policy Label in the Integrated Cache."

To invoke a policy label in a caching policy bank by using the command line interface

At the command prompt, type:

bind cache policylabel <labelName> -policname<policyName> -priority<priority> [-gotoPriorityExpression <gotopriorityExpression>] [-invoke <labelType> <labelName>]

To invoke a policy label in a caching policy bank by using the configuration utility

  1. Navigate to Optimization > Integrated Caching, click Cache policy manager, and specify the relevant bind point (Override Global or Default Global) and connection type to view the list of policies bound to this bind point.
  2. If you want to invoke a policy label without evaluating a policy, click NOPOLICY.
    Note: To invoke an external policy bank, click the field in the Invoke Type column, and select the type of policy bank that you want to invoke at this point in the policy bank. This can be a global label or a virtual server bank. In the Invoke Name field, enter the label or virtual server name. See "Entries to Control Evaluation Flow in a Policy Bank" for details.

To invoke a caching policy label in a virtual server policy bank by using the command line interface

At the command prompt, type:

  • bind lb vserver <name>@ -policyName <policyName>|<NOPOLICY-CACHE> -priority <positiveInteger> -gotoPriorityExpression <expression> -type REQUEST|RESPONSE -invoke <labelType> <labelName>
  • bind cs vserver <name> -policyName <policyName>|<NOPOLICY-CACHE> -priority <positiveInteger> -gotoPriorityExpression <expression> -type REQUEST|RESPONSE -invoke <labelType> <labelName>

To invoke a caching policy label in a virtual server policy bank by using the configuration utility

  1. Navigate to Traffic Management > Load Balancing/Contetn Switching > Virtual Servers, select the virtual server, and click Policies.
  2. If you are configuring an existing entry in this bank, skip this step. If you are adding a new policy to this policy bank, or you want to use the “dummy” NOPOLICY entry, click Add, and do one of the following:
    • To configure a new policy, click Cache and configure the new policy as described in "Configuring a Policy in the Integrated Cache."
    • To invoke a policy bank without processing a policy a rule, select the NOPOLICY-CACHE option.
    Note: To invoke an external policy bank, click the field in the Invoke Type column, and select the type of policy bank that you want to invoke at this point in the policy bank. This can be a global label or a virtual server bank. In the Invoke Name field, enter the label or virtual server name. See "Entries to Control Evaluation Flow in a Policy Bank" for details.