This section shows some example ECCU requests—it is not complete or exhaustive but is meant to be representative. It is followed by examples of Best Practices in requests.
Based on the Digital Property
You can invalidate all content associated with a Digital Property by submitting a request file that contains only the revalidate tag.
<eccu> <revalidate>1046581729</revalidate> </eccu>
Based on Host Header
A Digital Property may encompass many possible hostnames (for example, the Digital Property *.example.com would include images.example.com, www.example.com, any.example.com). Often it is more practical to restrict the revalidation to a particular hostname by enclosing the revalidate tag in a match on the Host header in the request. This request causes all requests from www.example.com to be revalidated.
<eccu> <match:request-header operation="name-value-cmp" argument1="Host" argument2="www.example.com"> <revalidate>now</revalidate> </match:request-header> </eccu>
Since the request-header match allows for substring comparisons on the value of the header, you could expand this request to revalidate all content served from any sub- domain of example.com.
<eccu> <match:request-header operation="name-value-strstr" argument1="Host" argument2=".example.com"> <revalidate>1046581729</revalidate> </match:request-header> </eccu>
Based on Directory Structure
You might wish to invalidate only the content served from a particular directory under a particular hostname. For example, you might want to invalidate all content served from the “dailyspecials” directory of www.example.com.
<eccu> <match:recursive-dirs value="dailyspecials"> <match:request-header operation="name-value-cmp" argument1="Host" argument2="www.example.com"> <revalidate>1046581729</revalidate> </match:request-header> </match:recursive-dirs> </eccu>
The instructions above cause all of the files in the “dailyspecials” directory and its subdirectories to be revalidated.
Path Matches Cannot be Nested
Path matches cannot be enclosed in other match types. You’ll notice in the example above that the request-header match is enclosed inside the directory match, even though you might consider the hostname of a request to be more general than the directory (or, in this sense, the URL path component). However, you can use multiple matches in a single request. See Best Practices in Request: Use Space-Separated Values.
Based On File Extension
If the entire web site has been republished, you might want to force revalidation of a large number of files. For example, you might want to revalidate all files with the extension .html. This could be accomplished with a single match on the extension:
<eccu> <match:ext value=”html”> <revalidate>now</revalidate> </match:ext> </eccu>