ECCU request examples

Get familiar with the ECCU use cases. It's not a complete list, but it's meant to be representative.

Purge based on the digital property

You can invalidate all content associated with a property by submitting a request file that contains only the revalidate tag.

<eccu>
    <revalidate>1046581729</revalidate>
</eccu>

Note that a digital property may encompass many hostnames.

🚧

A request over an entire digital property may cause a great deal of content revalidation and thus may cause a greatly increased request load on the origin server. You should use this type of request only if you intend to revalidate all content served under a particular digital property.

Purge based on the Host header

A digital property may encompass many possible hostnames. For example, the digital property *.example.commay include images.example.com, www.example.com, any.example.com. In such cases, restrict the revalidation to a particular hostname by enclosing the revalidate tag in a match on the Host header. This request revalidates all requests from www.example.com:

<eccu>
    <match:request-header operation="name-value-cmp"
          argument1="Host" argument2="www.example.com">
          <revalidate>now</revalidate>
     </match:request-header>
</eccu>

As the request-headermatch enables for substring comparisons on the value of the header, you can 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>

Purge ased on the directory structure

You can revalidate only the content served from a particular directory under a particular hostname. For example, you might want to invalidate all content served from the dailyspecialsdirectory 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 revalidate all files in the dailyspecialsdirectory and its subdirectories.

🚧

Mind the nesting

Path matches can't be enclosed in other match types. In the example above, the request-headermatch is enclosed inside the directory match, even though you might consider the hostname to be more general than the directory or the URL path component. However, you can use multiple matches in a single request.

Purge based on the file extension

If the entire website has been republished, you might want to force revalidation of a large number of files — for example, all files with the .htmlextension:

<eccu>
    <match:ext value="html">
        <revalidate>now</revalidate>
     </match:ext>
</eccu>

Did this page help you?