ADC

Direct policy requests to cache instead of origin web server

默认情况下,当请求匹配策略,Citrix ADC appliance forwards the request either to the origin server directly, or to a load balancing virtual server for the origin, depending on how you have configured cache redirection.

You can change the default behavior so that when a request matches a policy, the request is forwarded to a load balancing virtual server for the cache.

To change the destination for a policy request to the origin or the cache, use theonPolicyMatchparameter, which specifies where to send requests that match the cache redirection policy.

有效的选择s are:

  1. CACHE- Directs all matching requests to the cache.
  2. ORIGIN- Directs all matching requests to the origin server.

Note:

For this option to work, you must select the cache redirection type asPOLICY.

Possible values:CACHE,ORIGIN

Default value:ORIGIN

Change the destination for a policy request to the origin or the cache by using the CLI

At the command prompt, type the following commands to change the destination for a policy hit and verify the configuration:

set cr vserver  [-onPolicyMatch (ORIGIN | CACHE)] 
show cr vserver  

Example:

> set cr vserver Vserver-CRD-1 -onPolicyMatch CACHE Done > show cr vserver Vserver-CRD-1 Vserver-CRD-1 (*:80) - HTTP Type: CONTENT State: UP ARP:DISABLED Client Idle Timeout: 180 sec Down state flush: ENABLED Disable Primary Vserver On Down : DISABLED Default: Content Precedence: URL Cache: TRANSPARENT On Policy Match: CACHE L2Conn: OFF OriginUSIP: OFF Redirect: POLICY Reuse: ON Via: ON ARP: OFF 1) Cache bypass Policy: bypass-cache-control 2) Cache bypass Policy: Policy-CRD Done 

Change the destination for a policy hit to the origin or the cache by using the GUI

  1. Navigate toTraffic Management > Cache Redirection > Virtual Servers.
  2. In the details pane, select the virtual server for which you want to change the destination for a policy request, (for example,Vserver-CRD-1), and then click Open.
  3. In theConfigure Virtual Server (Cache Redirection)dialog box, clickAdvanced.
  4. SelectCACHEorORIGINfrom theRedirect Todrop-down list.
  5. ClickOK.
Direct policy requests to cache instead of origin web server