Product Documentation

Configuring a Selector

Aug 07, 2014

A content group can use a hit selector to retrieve cache hits or use an invalidation selector to expired cached objects and fetch new ones from the origin server.

A selector contains a name and a logical expression, called an advanced expression.

For more information about advanced expressions, see "Policies and Expressions."

To configure a selector, you assign it a name and enter one or more expressions. As a best practice, a selector expression should include the URL stem and host, unless there is a strong reason to omit them.

To configure a selector by using the command line interface

At the command prompt, type:

add cache selector <selectorName> ( <rule> ... )

For information about configuring the expression or expressions, see "To configure a selector expression by using the command line interface."

Examples

>add cache selector product_selector "http.req.url.query.value(\"ProductId\")" "http.req.url.query.value(\"BatchNum\")" "http.req.url.query.value(\"depotLocation\")" 
> add cache selector batch_selector "http.req.url.query.value(\"ProductId\")" "http.req.url.query.value(\"BatchId\")" "http.req.url.query.value(\"depotLocation\")" 
> add cache selector product_id_selector "http.req.url.query.value(\"ProductId\")" 
> add cache selector batchnum_selector "http.req.url.query.value(\"BatchNum\")" "http.req.url.query.value(\"depotLocation\")" 
> add cache selector batchid_selector "http.req.url.query.value(\"depotLocation\")" "http.req.url.query.value(\"BatchId\")" 

To configure a selector by using the configuration utility

Navigate to Optimization > Integrated Caching > Cache Selectors, and add the cache selector.