/v4/api/sites/{siteId}/clearCache (POST) - User Guide - BlueCat Edge

BlueCat Edge User Guide

ft:locale
en-US
Product name
BlueCat Edge

Clears specified domains from the cache of a site.

POST https://api-<BlueCat.edge.url>/v3/api/sites/{siteId}/clearCache
Authorization: Bearer authorization token

{
    "type": "domains",
    "domains": [
        "www.bluecatnetworks.com",
        "*.company.org"
    ]
}
Body parameters
  • type—the domains to be cleared from the cache of the site. To clear all domains from the site cache, enter the value all. To clear specific domains from the site cache, enter domains.
  • domains—a list of domains that you would like to clear from the site cache, such as www.bluecatnetworks.com.
    Attention: The list of domains is only required if you set the type to domains.
Behavior when clearing the cache
  1. When clearing the cache of a site:
    • For user-defined namespaces, the cache is only cleared based on the query itself and not the records in the answer.
      For example, if you clear the cache for *.bluecatnetworks.com, it would clear the cache for the following types of entries:
      website.bluecatnetworks.com IN A 1.2.3.4
      or
      www.bluecatnetworks.com IN CNAME website.bluecatnetworks.com
      website.bluecatnetworks.com IN A 1.2.3.4
      However, the following entry would not be cleared:
      www.example.com IN CNAME website.bluecatnetworks.com
      website.bluecatnetworks.com IN A 1.2.3.4
    • For discovered and recursive namespaces, if a domain was resolved using a forwarder, the cache for the record would be cleared based on the query itself and the record in the answer.
      For example, if you clear the cache for *.bluecatnetworks.com, it would clear the cache for the following types of entries:
      website.bluecatnetworks.com IN A 1.2.3.4
      or
      www.bluecatnetworks.com IN CNAME website.bluecatnetworks.com
      website.bluecatnetworks.com IN A 1.2.3.4
      or
      www.example.com IN CNAME website.bluecatnetworks.com
      website.bluecatnetworks.com IN A 1.2.3.4
      Attention: In this example, only the record website.bluecatnetworks.com IN A 1.2.3.4 is cleared. The whole entry is not cleared.

      If you clear the cache for *.example.com, you might still received a cached response for the website.bluecatnetworks.com A record, depending on the TTL of the cached response and whether the query occurred before the TTL of the entry lapsed. To ensure that the cache has been completely cleared, you must also clear the cache for *.bluecatnetworks.com, website.bluecatnetworks.com, and *.com.

  2. When clearing the cache of a site where you specify a domain, a wildcard character is required to clear all subdomains of the specified domain

    For example, if you clear the cache for bluecatnetworks.com, only the cache is cleared for bluecatnetworks.com and not www.bluecatnetworks.com.

    To ensure that all subdomains are cleared, you must use *.bluecatnetworks.com to ensure that www.bluecatnetworks.com is also cleared.

Successful response

202 Accepted
Possible error codes:
  • INTERNAL SERVER ERROR - Unexpected error