Product Documentation

Configuring Default Syntax Expressions Outside the Context of a Policy

Aug 31, 2016
A number of functions, including the following, can require a default syntax expression that is not part of a policy:
Integrated Caching selectors:
You define multiple non-compound expressions (selectlets) in the definition of the selector. Each selectlet is in an implicit logical AND relationship with the others.
Load Balancing:
You configure an expression for the TOKEN method of load balancing for a load balancing virtual server.
Rewrite actions:
Expressions define the location of the rewrite action and the type of rewriting to be performed, depending on the type of rewrite action that you are configuring. For example, a DELETE action only uses a target expression. A REPLACE action uses a target expression and an expression to configure the replacement text.
Rate-based policies:
You use default syntax expressions to configure Limit Selectors. You can use these selectors when configuring policies to throttle the rate of traffic to various servers. You define up to five non-compound expressions (selectlets) in the definition of the selector. Each selectlet is in an implicit logical AND with the others.

To configure a default syntax expression outside a policy by using the command line interface (cache selector example)

At the command prompt, type the following commands to configure a default syntax expression outside a policy and verify the configuration:
  • add cache selector <selectorName> <rule>
  • show cache selector <selectorName>

    Example

    > add cache selector mainpageSelector "http.req.cookie.value(\"ABC_def\")"   
    "http.req.url.query.value(\"_ghi\")"selector "mainpageSelector" added 
     Done 
    > show cache selector mainpageSelector 
            Name: mainpageSelector 
            Expressions: 
                    1) http.req.cookie.value("ABC_def") 
                    2) http.req.url.query.value("_ghi") 
     Done
    
    Following is an equivalent command that uses the more readable q delimiter, as described in "Configuring Default Syntax Expressions in a Policy":
    > add cache selector mainpageSelector2 q~http.req.cookie.value("ABC_def")~   
    q~http.req.url.query.value("_ghi")~selector "mainpageSelector2" added 
     Done 
    > show cache selector mainpageSelector2 
            Name: mainpageSelector2 
            Expressions: 
                    1) http.req.cookie.value("ABC_def") 
                    2) http.req.url.query.value("_ghi") 
     Done