Invalidation Preview Request Syntax

Invalidating Content 7-11 INVALIDATIONPREVIEWRESULT The body of a valid invalidation preview response begins with the following: ?xml version=1.0? DOCTYPE INVALIDATIONPREVIEWRESULT SYSTEM internal:WCSinvalidation.dtd The first line denotes version 1.0 of XML. The second line denotes that the response is an invalidation preview response using the WCSinvalidation.dtd file as the XML document type. Note the following: ■ No white space is allowed before ?xml. ■ If an application is sharing invalidation requests with a third-party XML parser, replace internal:WCSinvalidation.dtd with the following path: http:www.oracle.comwebcache90400WCSinvalidation.dtd The root element INVALIDATIONPREVIEWRESULT contains one or more of the attributes and elements described in Table 7–4 . BASICSELECTOR and ADVANCEDSELECTOR are described in Table 7–1 .

7.5.5 Invalidation Examples

This section contains the following invalidation request examples: ■ Section 7.5.5.1, Example: Invalidating One Object ■ Section 7.5.5.2, Example: Invalidating Multiple Objects ■ Section 7.5.5.3, Example: Invalidating a Subtree of Objects ■ Section 7.5.5.4, Example: Invalidating All Objects for a Web Site ■ Section 7.5.5.5, Example: Invalidating Objects Using Prefix Matching ■ Section 7.5.5.6, Example: Invalidating Objects Using Substring and Query String Matching ■ Section 7.5.5.7, Example: Invalidating Objects Using Search Key Matching Table 7–4 INVALIDATIONPREVIEWRESULT Elements and Attributes Invalidation ElementAttribute Description VERSION attribute Version number of the WCSinvalidation.dtd file to use as the XML document type STATUS attribute Status of the preview: ■ SUCCESS for successful invalidations ■ URI NOT CACHEABLE for objects that are not cacheable ■ URI NOT FOUND for objects not found STARTNUM attribute Number representing the first object to be listed NUMURLS attribute Number of URLs returned in this preview result TOTALNUMURLS attribute Number of URLs matching the BASICSELECTOR or ADVANCEDSELECTOR selectors SELECTEDURL element URLs matching the BASICSELECTOR or ADVANCEDSELECTOR selectors to be invalidated 7-12 Oracle Fusion Middleware Administrators Guide for Oracle Web Cache ■ Section 7.5.5.8, Example: Propagating Invalidation Requests Throughout a Cache Cluster ■ Section 7.5.5.9, Example: Previewing Invalidation The examples in this section require using the POST method which also requires sending the number of bytes or characters in the content_length: bytes portion of the header. Please note that one carriage return is required after the content_length: bytes line and before the XML request or BODY information.

7.5.5.1 Example: Invalidating One Object

The following request invalidates the file imageslogo.gif: ?xml version=1.0? DOCTYPE INVALIDATION SYSTEM internal:WCSinvalidation.dtd INVALIDATION VERSION=WCS-1.1 OBJECT BASICSELECTOR URI=http:www.company.com:80imageslogo.gif ACTION OBJECT INVALIDATION Invalidation response: ?xml version=1.0? DOCTYPE INVALIDATIONRESULT SYSTEM internal:WCSinvalidation.dtd INVALIDATIONRESULT VERSION=WCS-1.1 OBJECTRESULT BASICSELECTOR URI=http:www.company.com:80imageslogo.gif RESULT ID=1 STATUS=SUCCESS NUMINV=1 OBJECTRESULT INVALIDATIONRESULT The following request invalidates an object exactly matching contactscontacts.html using the BASICSELECTOR element: ?xml version=1.0? DOCTYPE INVALIDATION SYSTEM internal:WCSinvalidation.dtd INVALIDATION VERSION=WCS-1.1 OBJECT BASICSELECTOR URI=http:www.company.com:80contactscontacts.html ACTION REMOVALTTL=0 OBJECT INVALIDATION This request is equivalent to the following request using the ADVANCEDSELECTOR element. This request specifies the site information in the HOST attribute. ?xml version=1.0? DOCTYPE INVALIDATION SYSTEM internal:WCSinvalidation.dtd INVALIDATION VERSION=WCS-1.1 OBJECT ADVANCEDSELECTOR URIPREFIX=contacts URIEXP=contactscontacts\.html HOST=www.company.com:80 ACTION REMOVALTTL=0 OBJECT INVALIDATION The second request specifies the site information in the URIPREFIX attribute: ?xml version=1.0?