Specifies a cache ability constraint for the given url-pattern or servlet-name.
All constraint-field constraints must pass for a response to be cached. If value constraints are listed, at least one of them must pass.
The following table describes the value subelements for the constraint-field element.
Table A–41 constraint-field Subelements
Element |
Required |
Description |
---|---|---|
zero or more |
Contains a value to be matched to the input parameter value |
The following table describes attributes for the constraint-field element.
Table A–42 constraint-field Attributes
Attribute |
Default Value |
Description |
---|---|---|
name |
none |
Specifies the input parameter name. |
scope |
request.parameter |
(Optional) Specifies the scope in which the input parameter can be present. Allowed values are context.attribute, request.header, request.parameter, request.cookie, session.id, and session.attribute. |
cache-on-match |
true |
(Optional) If true, caches the response if matching succeeds. Overrides the same attribute in a value subelement. |
cache-on-match-failure |
false |
(Optional) If true, caches the response if matching fails. Overrides the same attribute in a value subelement. |