cr policy¶
The following operations can be performed on "cr policy":
add | rm | set | unset | show | rename
add cr policy¶
Creates a cache redirection policy. To associate the new policy with a cache redirection virtual server, use the bind cr vserver command.
Synopsys¶
add cr policy <policyName> -rule <expression> [-action <string>] [-logAction <string>]
Arguments¶
policyName
Name for the cache redirection policy. Must begin with an ASCII alphanumeric or underscore (_) character, and must contain only ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at sign (@), equal sign (=), and hyphen (-) characters. Cannot be changed after the policy is created.
The following requirement applies only to the NetScaler CLI:
If the name includes one or more spaces, enclose the name in double or single quotation marks (for example, ?my policy? or ?my policy?).
rule
Expression, or name of a named expression, against which traffic is evaluated. Written in the classic syntax.
Note:Maximum length of a string literal in the expression is 255 characters. A longer string can be split into smaller strings of up to 255 characters each, and the smaller strings concatenated with the + operator. For example, you can create a 500-character string as follows: "<string of 255 characters>" + "<string of 245 characters>"
The following requirements apply only to the NetScaler CLI:
-
If the expression includes one or more spaces, enclose the entire expression in double quotation marks.
-
If the expression itself includes double quotation marks, escape the quotations by using the \ character.
-
Alternatively, you can use single quotation marks to enclose the rule, in which case you do not have to escape the double quotation marks.
action
Name of the built-in cache redirection action: CACHE/ORIGIN.
logAction
The log action associated with the cache redirection policy
Related Commands¶
rm cr policy¶
Removes a cache redirection policy. You can delete a user-defined cache redirection policy that is not bound to a cache redirection virtual server. If the policy is bound to a virtual server, you must first unbind the policy, and then remove it.
Synopsys¶
rm cr policy <policyName>
Arguments¶
policyName
Name of the cache redirection policy to remove.
Related Commands¶
set cr policy¶
Changes the specified parameters of an existing cache redirection policy.
Synopsys¶
set cr policy <policyName> [-rule <expression>] [-action <string>] [-logAction <string>]
Arguments¶
policyName
Name of the cache redirection policy to change.
rule
Expression, or name of a named expression, against which traffic is evaluated. Written in the classic syntax.
Note:
Maximum length of a string literal in the expression is 255 characters. A longer string can be split into smaller strings of up to 255 characters each, and the smaller strings concatenated with the + operator.
For example, you can create a 500-character string as follows: "<string of 255 characters>" + "<string of 245 characters>"
The following requirements apply only to the NetScaler CLI:
-
If the expression includes one or more spaces, enclose the entire expression in double quotation marks.
-
If the expression itself includes double quotation marks, escape the quotations by using the character.
-
Alternatively, you can use single quotation marks to enclose the rule, in which case you do not have to escape the double quotation marks.
action
The cache redirection action name.
logAction
The log action associated with the cache redirection policy
unset cr policy¶
Unset logaction for existing cache redirection policy..Refer to the set cr policy command for meanings of the arguments.
Synopsys¶
unset cr policy <policyName> -logAction
Example¶
unset cr policy pol -logAction
show cr policy¶
Displays all existing cache redirection policies, or just the specified policy.
Synopsys¶
show cr policy [<policyName>]
Arguments¶
policyName
Name of the cache redirection policy to display. If this parameter is omitted, details of all the policies are displayed.
Outputs¶
rule
Expression, or name of a named expression, against which traffic is evaluated. Written in the classic syntax.
Note:Maximum length of a string literal in the expression is 255 characters. A longer string can be split into smaller strings of up to 255 characters each, and the smaller strings concatenated with the + operator. For example, you can create a 500-character string as follows: "<string of 255 characters>" + "<string of 245 characters>"
The following requirements apply only to the NetScaler CLI:
-
If the expression includes one or more spaces, enclose the entire expression in double quotation marks.
-
If the expression itself includes double quotation marks, escape the quotations by using the \ character.
-
Alternatively, you can use single quotation marks to enclose the rule, in which case you do not have to escape the double quotation marks.
domain
Domain name.
action
The CR action name.
vstype
Virtual server type.
hits
Total number of hits.
piHits
Total number of hits.
bindHits
Total number of hits.
piPolicyhits
bind hits for PI CR Policy.
priority
priority of bound policy
flag
stateflag
activePolicy
Indicates whether policy is bound or not.
csPolicyType
Indicates whether policy is PI or not.(used only during display)
logAction
The log action associated with the cache redirection policy
labelName
Name of the label invoked.
labelType
The invocation type.
builtin
gotoPriorityExpression
Expression specifying the priority of the next policy which will get evaluated if the current policy rule evaluates to TRUE.
isDefault
A value of true is returned if it is a default cr policy.
devno
count
Related Commands¶
rename cr policy¶
Rename a cache redirection policy.
Synopsys¶
rename cr policy <policyName>@ <newName>@
Arguments¶
policyName
The name of the content switching policy.
newName
The new name of the content switching policy.
Example¶
rename cr policy oldname newname