Web Application Cache Mapping Policy

See Also

Cache Policy

Use this panel to set cache policy.

Timeout Name

Specify a timeout input parameter, whose value is interpreted in seconds. The field's type must be java.lang.Long or java.lang.Integer.

Timeout duration (seconds)

Type in the timeout duration in seconds.

Timeout Scope

Optionally, select the scope in which the input parameter can be present. Allowed values are context.attribute, request.header, request.parameter, request.cookie, request.attribute, and session.attribute.

Refresh Field Name

Specifies the input parameter name for the refresh field. This gives the application component a programmatic way to refresh a cached entry.

Refresh Scope

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.

HTTP Methods to Cache

Check if Get and/or Post methods should be cached.

Key Fields

Specifies a component of the key used to look up and extract cache entries. The web container looks for the named parameter, or field, in the specified scope. If this element is not present, the web container uses the Servlet Path (the path section that corresponds to the servlet mapping that activated the current request). See the Servlet 2.3 specification, section SRV 4.4, for details on the Servlet Path.

Click the New button to add parameters of the key field element.

Name Description
Name Indicates the input parameter name.
Scope

Indicates 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.

Constraint Fields

Specifies a cacheability constraint for the given url-pattern or servlet-name. All constraints must pass for a response to be cached. If there are value constraints, at least one of them must pass.

Click the New button to add parameters of the Constraint Field element.

Name Description
Name Indicates the input parameter name.
Scope Indicates 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 If checked, caches the response if matching succeeds. Overrides the same attribute in a value subelement.
cache-on-match-failure

If checked, caches the response if matching fails. Overrides the same attribute in a value subelement.

See Also
About Deployment Descriptors
Editing a Web Application's Deployment Descriptors
Changing the Target Server
sun-web.xml Visual Editor:
         General
         Session
         Messages
         Locale
         Cache
         Web Service Descriptor

Legal Notices