Updated on 2026-07-06 GMT+08:00

Shared Cache Groups

If different domain names point to the same resources, you can configure a shared cache group and set a primary domain name. Other domain names in the group share the cache of the primary domain name, improving the cache hit ratio.

Working Principles

When added to a shared cache group, all acceleration domains share the primary domain's cache. Figure 1 illustrates how client requests are processed using the primary domain primary.example.com and an associated domain domain01.example.com.

Figure 1 Shared cache request process
  1. The client requests a resource from primary.example.com/test/a.txt for the first time.
  2. As the requested resource is not cached, the CDN PoP pulls it from the origin server.
  3. The origin server delivers the requested resource to the CDN PoP.
  4. The CDN PoP caches the resource and delivers it to the client.
  5. The client requests the same resource via the associated domain domain01.example.com/test/a.txt in the shared cache group.
  6. The CDN PoP recognizes that the requested resource is the same as that requested in 2 and delivers the cached resource directly to the client, bypassing the origin server.

Precautions

  • Domain names in a shared cache group share the cached resources of the primary domain name. If no resources are cached, a large number of origin pull requests may be sent, occupying the origin server bandwidth. Exercise caution when adding a domain name to a shared cache group.
  • A domain name can be added to a shared cache group only when Query Parameters is set to Ignore all or Retain all.
  • Each shared cache group can contain up to 50 associated domain names.
  • An account can have up to 500 shared cache groups.
  • Before deleting a cache group, you need to remove associated domain names from the group.

Procedure

  1. Log in to the CDN console.
  2. In the navigation pane, choose Domains.
  3. On the Domains page, click the Cache Sharing Groups tab.
  4. Click Create Group to add a shared cache group.
    Figure 2 Creating a shared cache group
    Table 1 Parameter description

    Parameter

    Description

    Cache Group Name

    Name of the shared cache group. A name contains 1 to 128 characters and does not support the following special characters: %&=?$"<>

    Primary Domain

    Primary domain name of the shared cache group. Other domain names in the group share the cache resources of this domain name.

    Associated Domains

    Domain names associated with the shared cache group. They share the cache resources of the primary domain name.

  5. Set required parameters and click OK.