百度智能云

All Product Document

          CDN

          Cache Purging

          Introduction to the principle

          Cache purge methods include URL purge and directory purge. URL purge is to purge cache in the unit of a file or a resource. Directory purge takes directory as the unit and cache all files in the directory. Preloading is to prefetch resources in units of files. The wildcard domain name does not support direct prefetch or purge, which can be done by specific domain name. If the wildcard domain name is a shared cache, use any of the specific domain names to refresh or prefetch.

          Difference between purging and prefetching:

          • After the purge is cleared, it deletes cache of the resource on CDN nodes in the entire network. When the user’s request reaches the node, the node returns to the origin server to pull the corresponding resources to return to the user and cache in the node, to ensure that the user gets the latest resources.
          • After prefetching, the resource is cached in advanced to CDN nodes of the whole network. When the user request reaches the node, the user can access the resources at the node. Prefetching is generally carried out before the release of concentrated resources, which greatly reduces the pressure on the origin server.
          • After you update a resource on the origin server, and want the user not to access the old resource but access the new one, you can use URL Refresh or Directory Refresh feature. If you want CDN to cache the resources from the origin server proactively to CDN node in advance, you can use Pre-load feature.

          Note: The update mechanism for node cache resources in CDN is generally controlled by expiration time of cache, and an appropriate configuration of cache expiration time strategy can effectively reduce the rate of forward to origin. Please refer to Cache Expiration Configuration for more information.

          Purge URL

          1.Log into the CDN Management Console, select Purge Cache in the left navigation of the console, and select the URL Purge tab on the cache purge page.

          2.Enter the URL that needs to be refreshed and cleared.

          image.png

          Explanation:

          • The entered URL to be purged and cleared shall start with http:// or https://;
          • You can only submit a purging and clearing request which belongs to the domain name under the current account.
          • Separate multiple purging and clearing operations by carriage returns.
          • Up to 1,000 URLs can be submitted for cleaning at one time
          • The URL is accurate to the resource, and does not support regular or wildcard character.
          • A maximum of 20,000 URL pursing can be submitted each day, and a maximum of 1,000 can be submitted at one time. The refresh takes effect for about 5 minutes.

          3.Click OK to wait for cleaning.

          4.After completing the operation, you can view the progress and result of cache clearing on the Operation Record tab.

          Purge Catalog

          1.Log in CDN Management Console, select the button Refresh Cache from the Navbar on the left of the console, and then refresh the cache page to select the tab Directory Refresh.

          image.png

          2.Enter the directory for which cache has to be purged and cleared.

          Note:

          • The directory URL to be refreshed and cleared must be started with http: // or https: //
          • You can only submit a purging and clearing request which belongs to the domain name under the current account.
          • Separate multiple purging and clearing operations by carriage returns.
          • A maximum of 200 directory pursing can be submitted each day, and a maximum of 10 can be submitted at one time. The refresh takes effect for about 5 minutes.

          3.Click Submit to wait for cleaning, 4.You can view the progress and result of the directory purge on the Operation Record tab after completing the operation.

          Previous
          Statistical Analysis
          Next
          Preload