Invalidation Request Syntax Format of Invalidation Requests for Out-of-Band and ESI Inline Mechanisms

7-6 Oracle Fusion Middleware Administrators Guide for Oracle Web Cache URIEXP attribute: Optional attribute of the ADVANCEDSELECTOR element. Specify the URL of the objects to be invalidated underneath the URIPREFIX. If no value is entered, everything under the URIPREFIX are matched. Regular expression characters are permitted. To interpret these characters literally, escape them with a backslash \. See http:www.cs.utah.edudeptoldtexinforegexregex_toc.html for regular expression syntax. Notes: ■ The request URL that client browsers send to Oracle Web Cache and the URL that Oracle Web Cache uses internally for that request are different. When Oracle Web Cache serves a page request, it alphabetically sorts any embedded URL parameters of the URL. However, the invalidation requests are matched against only the internal representation of the URL in which any embedded URL parameters are sorted. To ensure invalidation requests are matched correctly, sort and enter the embedded URL parameters alphabetically. ■ When the invalidation request is sent, Oracle Web Cache performs a regular expression match of URIEXP. This can take processing time. As an alternative, you can use the OTHER element to specify a substring match rather than a regular expression match. HOST attribute: This attribute is required if the URIPREFIX value does not include host_name :port and the invalidator account is sending the request. Specify the host name and port number of the site host_name:port. Port 80 is the default port for HTTP. METHOD attribute: Optional attribute of the ADVANCEDSELECTOR element. Specify either GET or POST for the HTTP request method of the objects to be invalidated. GET is the default value. BODYEXP attribute: Optional attribute of the ADVANCEDSELECTOR element. If the METHOD is set POST, specify the HTTP POST body of the objects to be invalidated. Note: When the invalidation request is sent, Oracle Web Cache performs a regular expression match of BODYEXP. This can take processing time. As an alternative, you can use the OTHER element to specify a substring match rather than a regular expression match. COOKIE element Optional element in the invalidation request. Use the following attributes: ■ NAME attribute: Required attribute for the COOKIE element attribute. Specify the cookie name to invalidate multiple-version objects based on the cookie. ■ VALUE attribute: Optional attribute for the COOKIE element. Specify the value of the cookie. If no value is present, only objects with the named cookie but without a value are invalidated. If you specify a cookie that was mistakenly specified for both a multiple-version object and a session caching policy, invalidation is based on any occurrence of the cookie. To avoid excessive invalidation, configure distinct cookies for multiple-version objects and session caching policies. For more information, see: ■ Section 6.8.2 to create caching rules for multiple-version objects ■ Section 6.8.6 to specify session caching policies Table 7–1 Cont. INVALIDATION Elements and Attributes Invalidation ElementAttribute Description Invalidating Content 7-7 HEADER element Optional element in the invalidation request. Use the following attributes: ■ NAME attribute: Required attribute for the HEADER element. Specify the HTTP request header to invalidate multiple-version objects based on the request header. ■ VALUE attribute: Optional attribute for the HEADER element. Specify the value of the header. See Section 6.8.2 to create caching rules for multiple-version objects. OTHER element Optional element in the invalidation request. Use the following attributes: ■ NAME attribute: Required attribute of the OTHER element. NAME supports the following values: - URI to specify a match of the URL underneath the URIPREFIX - BODY to specify a match of the HTTP POST body - QUERYSTRING_PARAMETER to specify a match of an embedded URL parameter - SEARCHKEY to specify a match of a search key in the Surrogate-Key response header ■ TYPE attribute: Required attribute for URI, BODY, and QUERYSTRING_ PARAMETER. This attribute is not recognized for SEARCHKEY. TYPE supports the following values: - SUBSTRING to specify an exact string match for QUERYSTRING_PARAMETER and a substring match for URI and BODY. - REGEX to specify a regular expression match ■ VALUE attribute: Required attribute for URI, BODY, QUERYSTRING_PARAMETER, and SEARCHKEY. Specify the value of URI, BODY, QUERYSTRING_PARAMETER, or SEARCHKEY. If you specify a TYPE of REGEX, then escape regular expression characters with a backslash \ for Oracle Web Cache to interpret literally. For more information, see: ■ Section 7.5.5 to optimize advanced invalidations ■ Section 7.9 to configure search keys ACTION element Required element in the invalidation request REMOVALTTL attribute Optional attribute of the ACTION element. Specify the maximum time that objects can reside in the cache before they are invalidated. The default is 0 seconds. INFO element Optional element in the invalidation request VALUE attribute Required attribute of the INFO element. Specify a comment to be included in the invalidation result. After the invalidation request is complete, the message that contains the comment, along with the result of the invalidation, writes to the event log: [15Oct2008:19:26:46 +0000] [notification 11748] [invalidation] [ecid: 21085932167,0] Invalidation with INFO INFO_comment has returned with status status; number of objects invalidated: number. Note: The following special XML characters must be escaped in the fields: ampersand with amp;, greater than sign with gt, less than sign with lt, double quotes with quot, and single quotes with apos;. Table 7–1 Cont. INVALIDATION Elements and Attributes Invalidation ElementAttribute Description 7-8 Oracle Fusion Middleware Administrators Guide for Oracle Web Cache

7.5.2 Invalidation Response Syntax

Invalidation responses are returned in the following format for BASICSELECTOR invalidation requests: ?xml version=1.0? DOCTYPE INVALIDATIONRESULT SYSTEM internal:WCSinvalidation.dtd INVALIDATIONRESULT VERSION=WCS-1.1 SYSTEM SYSTEMINFO NAME=name VALUE=value SYSTEM OBJECTRESULT BASICSELECTOR URI=URL BASICSELECTOR RESULT ID=ID STATUS=status NUMINV=number INFO VALUE=value OBJECTRESULT INVALIDATIONRESULT Invalidation responses are returned in the following format for ADVANCEDSELECTOR invalidation requests: ?xml version=1.0? DOCTYPE INVALIDATIONRESULT SYSTEM internal:WCSinvalidation.dtd INVALIDATIONRESULT VERSION=WCS-1.1 SYSTEM SYSTEMINFO NAME=name VALUE=value SYSTEM OBJECTRESULT ADVANCEDSELECTOR URIPREFIX=prefix URIEXP=URL_expression HOST=host_name:port METHOD=HTTP_request_method BODYEXP=HTTP_body COOKIE NAME=cookie_name VALUE=value HEADER NAME=HTTP_request_header VALUE=value OTHER NAME=URI|BODY|QUERYSTRING_PARAMETER|SEARCHKEY TYPE=SUBSTRING|REGEX VALUE=value ADVANCEDSELECTOR RESULT ID=ID STATUS=status NUMINV=number INFO VALUE=value OBJECTRESULT INVALIDATIONRESULT Note: Oracle Web Cache continues to support invalidation requests sent in the following release 1.0 format: ?xml version=1.0? DOCTYPE INVALIDATION SYSTEM internal:invalidation.dtd INVALIDATION URL EXP=URL PREFIX=YES|NO VALIDITY LEVEL=validity REFRESHTIME=seconds COOKIE NAME=cookie_name VALUE=value NONEXIST=YES|NO HEADER NAME=HTTP_request_header VALUE=value URL INVALIDATION Invalidating Content 7-9 The body of a valid invalidation response begins with the following: ?xml version=1.0? DOCTYPE INVALIDATIONRESULT SYSTEM internal:WCSinvalidation.dtd The first line denotes version 1.0 of XML. The second line denotes the response is an invalidation response using the WCSinvalidation.dtd file as the XML document type. The root element INVALIDATIONRESULT contains one or more of the attributes and elements described in Table 7–2 . BASICSELECTOR and ADVANCEDSELECTOR are described in Table 7–1 .

7.5.3 Invalidation Preview Request Syntax

To test invalidation, use the following syntax to preview the list of BASICSELECTOR objects to be invalidated: ?xml version=1.0? DOCTYPE INVALIDATIONPREVIEW SYSTEM internal:WCSinvalidation.dtd INVALIDATIONPREVIEW VERSION=WCS-1.1 STARTNUM=start_number MAXNUM=max_ number BASICSELECTOR URI=URL INVALIDATIONPREVIEW Use the following syntax to preview the list of ADVANCEDSELECTOR objects to be invalidated: ?xml version=1.0? DOCTYPE INVALIDATIONPREVIEW SYSTEM internal:WCSinvalidation.dtd INVALIDATIONPREVIEW VERSION=WCS-1.1 STARTNUM=start_number MAXNUM=max_ Table 7–2 INVALIDATIONRESULT Elements and Attributes Invalidation ElementAttribute Description VERSION attribute Version number of the WCSinvalidation.dtd file to use as the XML document type SYSTEM element Optional element in the INVALIDATIONRESULT element. The SYSTEM element is optional. The SYSTEM element requires the SYSTEMINFO element. SYSTEMINFO element Required element in the SYSTEM element. The possible NAMEVALUE pairs is as follows: NAME=WCS_CACHE_NAME VALUE=string This pair specifies the name of the cache. RESULT element Use the following attributes: ■ ID attribute: Sequence number of all the invalidation objects sent in the invalidation response. If there are multiple selectors specified in the invalidation request, the sequence number starts at 1 for the first URL and continues sequentially for each additional selector. ■ STATUS attribute: Status of the invalidation: - SUCCESS for successful invalidations - URI NOT CACHEABLE for objects that are not cacheable - URI NOT FOUND for objects not found ■ NUMINV attribute: Number of objects invalidated during the invalidation request INFO element Returns the comment specified in the INFO element of the invalidation request 7-10 Oracle Fusion Middleware Administrators Guide for Oracle Web Cache number ADVANCEDSELECTOR URIPREFIX=prefix URIEXP=URL_expression HOST=host_name:port METHOD=HTTP_request_method BODYEXP=HTTP_body COOKIE NAME=cookie_name VALUE=value HEADER NAME=HTTP_request_header VALUE=value OTHER NAME=URI|BODY|QUERYSTRING_PARAMETER|SEARCHKEY TYPE=SUBSTRING|REGEX VALUE=value ADVANCEDSELECTOR INVALIDATIONPREVIEW The body of a valid invalidation preview request must begin with the following: ?xml version=1.0? DOCTYPE INVALIDATIONPREVIEW SYSTEM internal:WCSinvalidation.dtd The first line denotes version 1.0 of XML. The second line denotes the request is an invalidation preview request using the WCSinvalidation.dtd file as the XML document type. The root element INVALIDATIONPREVIEW contains one or more of the attributes described in Table 7–3 . BASICSELECTOR and ADVANCEDSELECTOR are described in Table 7–1 .

7.5.4 Invalidation Preview Response Syntax