Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Cache Purge

Updated on 2025-02-10 GMT+08:00

After resources on the origin server are updated, if the old resources cached on CDN PoPs do not expire, CDN still returns the old resources to users. You can use cache purge to forcibly expire resources cached on CDN PoPs. When a user accesses a resource, CDN pulls the latest resource from the origin server, returns it to the user, and caches it on CDN PoPs.

Typical Scenarios

New content release: After new content overwrites old content with the same name on origin servers, to enable all users to access the latest content, you can submit requests to refresh corresponding URLs or directories of the content, forcing the cached content on the PoPs to expire.

Non-compliant content clearing: When non-compliant content is detected and deleted from origin servers, the cached content on PoPs can still be accessed. You can refresh URLs to delete the cached content.

Precautions

  • Cache purge can be performed only for unbanned domain names in Enabled or Configuring state. For more information about the domain status, see Viewing Basic Domain Information.
  • If a URL is rewritten, you must use the actual resource path of the new URL for cache purge.
  • Some resources may be cached in browsers. Refresh the browser cache after the PoP cache is refreshed.
  • You can also create a cache purge task for a domain name by calling an API. For details, see API Overview.
  • It takes about 5 minutes for a cache purge task to take effect.
  • By default, cache of TS/MP4 files under M3U8/MPD index files is not refreshed.

Procedure

  1. Log in to Huawei Cloud console. Choose Service List > Content Delivery & Edge Computing > Content Delivery Network.

    The CDN console is displayed.

  2. In the navigation pane, choose Prefetch & Purge.
  3. Click the Purge tab, select the content type, and enter the URLs or directories to be refreshed or drag a TXT file to the text box.
    Figure 1 Cache purge
    Table 1 Parameter description

    Type

    Description

    URL

    • CDN refreshes a specific file.

    The format of a URL in the text box or in the TXT file must meet the following requirements:

    • Each account can refresh a maximum of 2,000 URLs per day and a maximum of 1,000 URLs per task.
    • http:// or https:// must be included.
    • End the homepage URL with a slash (/). Example: http://www.example.com/
    • Enter one URL per row.

      Examples:

      http://www.example.com/file01.html

      http://www.example.com/file02.html

      https://example.huawei.com/download/app/abc.apk

    NOTE:
    • Submit complete file URLs. If you submit a directory, URL refreshing does not take effect.
    • If a URL contains spaces, escape spaces in the URL and disable URL Encode.

    Directory

    Mode:

    • Purge updated resources: Purge resources that have been updated in a directory (including subdirectories).
    • Purge all resources: Purge all resources in a directory, including resources in subdirectories.

    Configuration rules:

    • Each account can refresh a maximum of 100 directories per day at a time.
    • A URL must contain http:// or https:// and end with a slash (/).
    • Enter one URL per row.

    Examples:

    http://www.example01.com/folder01/

    http://www.example01.com/folder02/

    NOTE:
    • URLs in the text box or in the TXT file have the same format.
    • If you select Purge all resources when refreshing the root directory, the cache of all resources will expire. As a result, CDN pulls content for all requests from the origin server. If the access traffic is too heavy, the origin server may break down.
    • If you select Purge all resources when refreshing a directory, all resources in the directory, including subdirectories will be refreshed. Only one directory is counted against the directory refreshing quota.

    URL Encode

    If enabled, Chinese characters in URLs are automatically transcoded and cache is purged only for transcoded URLs.

    • To purge an untranscoded URL with Chinese characters, enter this URL and disable URL Encode.
  4. Click Submit.

    After a purge task is submitted, you can view the status of the task on the Task Progress tab.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback