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

FAQ

Updated on 2024-10-16 GMT+08:00

What Are the Differences Between Cache Purge and Prefetch?

The differences between cache purge and prefetch are:

  • Cache purge

    After you submit a cache purge request, cached content on CDN PoPs will be forcibly expired. If a user requests that content, CDN will have to request fresh content from the origin server and then cache that new content.

  • Cache prefetch

    After you submit a cache prefetch request, the origin server proactively sends the most current content to a CDN PoP to be cached. If a user requests the content, the CDN PoP immediately returns the cached content. It does not need to pull any new content.

For details, see Cache Purge and Prefetch.

Is There a Sequence Between CDN Cache Purge and Prefetch?

If you want to update cached content on CDN PoPs after your origin content is updated, pay attention to the following:

  • You must purge the cache first. It takes about 5 minutes for a cache purge task to take effect. Then, prefetch the cache.
  • If you skip cache purge and directly perform cache prefetch, the cached content on CDN PoPs will not be updated.
  • If you access CDN for the first time and no content is cached on CDN PoPs, you can directly perform cache prefetch to cache content to CDN PoPs.

Does Cache Purge Refresh Content Cached on All PoPs?

Yes.

Why Is a Particular Prefetch Task in the Being Processed Status for Such a Long Time?

Possible causes include:

  • The task was submitted during a peak hour, so it is still in the queue.
  • You are prefetching a large number of files. Prefetch will pull content from the origin server, so pulling a large number of files may consume all of the bandwidth available for your origin server. You are advised to:
    • Divide files to be prefetched into batches.
    • Prefetch files during off-peak hours, for example, at night.
    • Increase your origin server bandwidth.
  • The task has been completed but the status is not refreshed on the console. Refresh the console page and check again.

How Do I Purge the CDN Cache Where the Domain Name Includes a Wildcard?

When purging the cache for a domain name that includes a wildcard, enter the URLs or directories of the level-2 domain names to be refreshed. Do not enter a URL containing a wildcard, such as https://*.example.com/file01.html or https://*.example.com/file02/.

Example:

  • An acceleration domain name is *.example.com.
  • The level-2 domain name housing the content to be refreshed is abc.example.com.
    1. Enter the URL to be refreshed: https://abc.example.com/file01.html.
    2. Enter the directory to be refreshed: https://abc.example.com/file02/.

Why Is It That Even After I Prefetched or Purged the Cache, the Content Has Not Updated?

The interval between cache purge and prefetch may be too short. As a result, the purge fails. If a cache has just been purged or prefetched, it is recommended that you wait at least 5 minutes before repeating this action.

What Should I Do If a Cache Prefetch Operation Fails?

It is possible that:

  • A large number of files are being prefetched at the same time, and this operation has occupied all of the origin server's bandwidth. In this case, you are advised to perform prefetch operations in batches. You can also increase the bandwidth of the origin server to improve the efficiency.
  • The cache TTL of your requested content is 0. In this case, change the cache TTL.
  • Cache-Control is private, no-cache, or no-store. If Cache-Control is not configured, the default value private is used.
  • You requested to prefetch directories, dynamic content, or URLs whose cache TTL is set to 0.

Does CDN Support Directory Prefetch?

No. Only complete URLs can be prefetched. Prefetching directories is not supported. For details, see Cache Purge and Prefetch.

Do I Need to Prefetch or Purge HTTP and HTTPS URLs Separately?

No. You only need to prefetch or purge either HTTP or HTTPS URLs.

If CDN Is Enabled in and Outside the Chinese Mainland, Does It Need to Be Differentiated When Prefetch and Purge?

No. You can directly prefetch or purge the corresponding URLs.

Can I Prefetch M3U8 Files?

Yes.

Why Does the System Report an Error Indicating that I Have No Permission to Purge the Cache?

It is possible that your acceleration domain name has been disabled. Enable CDN for the domain name again. If your account is in arrears, CDN may have been disabled for your acceleration domain name.

Can the Cache Be Automatically Updated After a Static File on the Origin Server Is Updated?

No. However, you can call APIs to force the current content to expire and then prefetch new content. For details, see API Overview.

Are Cache Purge and Prefetch Mandatory?

It depends.

  1. After updating a file on the origin server, purge the cache on CDN PoPs. Or, clients may obtain the stale version of the file, or encounter issues such as access failures, repeated redirections, white screens, or disordered page displays.
  2. It is recommended that large files, especially video files, be prefetched to improve user experience.
  3. Prefetch is not recommended for small files.

Currently, CDN does not support automatic purge or prefetch. You need to manually perform these operations.

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