Cache
Cache stores resolution results in memory to accelerate domain name resolution for repeated requests within a private network.
Add cache retention domain names
Cache retention keeps the DNS records of a domain name in memory and never releases them. If no cached record exists, the system fetches one. If a cached record already exists, the system does not trigger an update. After the TTL of the record expires, the next query for the domain name is answered with the existing cached record, and the system then updates the record. If the query returns no record, the system keeps answering with the previous record.
We recommend that you enable cache retention for frequently accessed or business-critical domain names. The resolution results are kept in the cache permanently, which speeds up resolution in your private network and mitigates the service interruption caused by a failure of the authoritative DNS provider. During such a failure, the system keeps answering queries with the previously resolved records.
For a domain name that has a CNAME record, cache retention applies only to the first hop of the CNAME. The domain names after that hop are not cached. To accelerate the entire resolution path, add every domain name in the CNAME chain as a cache retention domain name.
Go to the Alibaba Cloud DNS - Private Zone page.
Click Cache > Add Domain Name.
Configure the parameters.
Parameter
Description
Domain Name
Enter the domain name for which you want to enable cache retention. Cache retention applies only to the exact domain name that you enter and does not include its subdomains.
Record Type
The DNS record type to cache. Supported types:
A, AAAA, CNAME, TXT, MX, SRV, and PTR.
Cache Retention
The resolution results of the domain name are kept in the cache module and are never released. Queries are answered from the cached data in less than 1 ms.
After the TTL expires, a new query for the domain name is answered from the cached data first, and the system updates the cached data from the authoritative source.
Effective Scope
Defines the network environments in which cache retention takes effect. Networks outside the specified scope will not benefit from cache acceleration.
The system resolves domain names that have cache retention enabled (excluding their subdomains) at a fixed interval, obtains the latest resolution records, and updates them in the DNS cache. This accelerates resolution of these domain names in the private networks within the effective scope.
A cache retention rule is effective only within the specified network scope. When accessed from networks outside that scope, the domain name will not benefit from cache acceleration.
Modify cache retention domain names
Go to the Alibaba Cloud DNS - Private Zone page.
Click Cache, find the domain name, and then click Edit in the Actions column.
Delete cache retention domain names
Go to the Alibaba Cloud DNS - Private Zone page.
Click Cache, find the domain name, and then click Delete in the Actions column.
Clear cache
During an urgent change, a workload in your private network may require the Private Zone service to serve the latest DNS records of a domain name. If cache retention is enabled for the domain name, use cache clearing to remove its cached data from the cache servers within the specified effective scope. Cache clearing is billed per operation on a pay-as-you-go basis.
Go to the Alibaba Cloud DNS - Private Zone page.
Click Cache, find the domain name, and then click Clear Cache in the Actions column.
In the dialog box that appears, confirm the operation.
NoteCache clearing refreshes the cache only for the selected domain name and does not include subdomains. It is subject to a rate limit of 2 requests per second.