Invalidation Preview Response Syntax

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? Invalidating Content 7-13 DOCTYPE INVALIDATION SYSTEM internal:WCSinvalidation.dtd INVALIDATION VERSION=WCS-1.1 OBJECT ADVANCEDSELECTOR URIPREFIX=http:www.company.comcontacts URIEXP=contactscontacts\.html ACTION REMOVALTTL=0 OBJECT INVALIDATION The ADVANCEDSELECTOR element uses the URIPREFIX attribute. This attribute is used to traverse the directory structure. The quicker invalidation reaches the right tree level, the quicker the invalidation process is done. The request with the BASICSELECTOR element is the more efficient of the two examples because there is no directory structure traversal involved.

7.5.5.2 Example: Invalidating Multiple Objects

The following request invalidates two different objects, summary.jsp and summary.gif. In addition, the request provides the comments summary.jsp and summary.gif to be included in the invalidation result and event log. ?xml version=1.0? DOCTYPE INVALIDATION SYSTEM internal:WCSinvalidation.dtd INVALIDATION VERSION=WCS-1.1 OBJECT ADVANCEDSELECTOR URIPREFIX=globalsales URIEXP=summary.jsp\?year=2001 HOST=www.company.com:80 COOKIE NAME=group VALUE=asia ADVANCEDSELECTOR ACTION INFO VALUE=summary.jsp OBJECT OBJECT ADVANCEDSELECTOR URIPREFIX=image URIEXP=summary.\.gif HOST=www.company.com:80 INFO VALUE=summary.gif ACTION OBJECT INVALIDATION Invalidation response: ?xml version=1.0? DOCTYPE INVALIDATIONRESULT SYSTEM internal:WCSinvalidation.dtd INVALIDATIONRESULT VERSION=WCS-1.1 OBJECTRESULT ADVANCEDSELECTOR URIPREFIX=globalsales URIEXP=summary.jsp\?year=2001 HOST=www.company.com:80 COOKIE NAME=group VALUE=asia ADVANCEDSELECTOR RESULT ID=1 STATUS=SUCCESS NUMINV=2 INFO VALUE=summary.jsp OBJECTRESULT OBJECTRESULT ADVANCEDSELECTOR URIPREFIX=image URIEXP=summary.\.gif HOST=www.company.com:80 ADVANCEDSELECTOR RESULT ID=2 STATUS=SUCCESS NUMINV=14 INFO VALUE=summary.gif OBJECTRESULT INVALIDATIONRESULT