Dynamic Route for CDN (DCDN) allows you to create cache expiration rules for static resources of specified file types or in specified directories. Each cache expiration rule defines the time-to-live (TTL) value and the priority for the cached resources. When a static resource expires, the resource is automatically deleted from DCDN nodes. This topic describes the DCDN cache policy and how to create a cache expiration rule.
Background information
A cache server caches resources of specified file types or in specified directories
based on the specified cache policy. You can set the TTL value in a cache expiration
rule to specify the time period for which the resources are cached.
- You can customize the priority of each cache policy.
- By default, cache policies are applied based on the following rules:
- If a cache rule is configured for an origin server, the specified cache expiration rule takes priority over the cache rule for the origin server.
- If no cache rules are configured for an origin server, you can set cache expiration rules by directory or file extension. Full paths are supported for cache policies.
The following figure shows how cache policies are applied to resources on DCDN nodes.

Note
- You can set cache expiration rules in a cache policy to specify the expiration time of files. The specified cache expiration rule takes priority over the cache rule for the origin server. If no cache rule is configured for the origin server, you can set a cache rule by directory or by file extension.
- A DCDN node may remove the cached files that are not frequently updated on the node before the files expire.