Edge Acceleration
  • Site Acceleration
    • Overview
    • Quickly Import and Export Site Configuration
    • Access Control
      • Token Authentication
    • Smart Acceleration
    • File Optimization
      • Smart Compression
    • Network Optimization
      • HTTP/2
      • HTTP/3(QUIC)
        • Overview
        • Enable HTTP/3
        • QUIC SDK
          • SDK Overview
          • SDK Download and Integration
          • Sample Code
            • Android
            • iOS
          • API Documentation
            • Android
            • iOS
      • IPv6 Access
      • Maximum Upload Size
      • WebSocket
      • Client IP Geolocation Header
      • Client IP Geographical Location
      • gRPC
    • URL Rewrite
      • Access URL Redirection
      • Origin-Pull URL Rewrite
    • Modifying Header
      • Modifying HTTP Response Headers
      • Modifying HTTP Request Headers
    • Custom Error Page
    • Request and Response Actions
      • Processing order
      • Default HTTP Headers of Origin-Pull Requests
      • Default HTTP Response Headers
    • Media Services
      • Audio and Video Pre-pulling
      • Just-in-Time Image Processing
      • Just-in-Time Media Processing
      • VOD Media Origin
  • L4 Proxy
    • Overview
    • Creating an L4 Proxy Instance
    • Modifying an L4 Proxy Instance
    • Disabling or Deleting an L4 Proxy Instance
    • Batch Configuring Forwarding Rules
    • Obtaining Real Client IPs
      • Obtaining Real TCP Client IPs via TOA
      • Obtaining Real Client IPs Through Protocol V1/V2
        • Overview
        • Method 1: Obtaining Real Client IPs Through Nginx
        • Method 2: Parsing Real Client IPs on Application Server
        • Format of Real Client IPs Obtained Through Proxy Protocol V1/V2
      • Transmitting Client Real IP via SPP Protocol
  • Edge DNS
    • Hosting DNS Records
      • Modifying DNS Servers
      • Configuring DNS Records
      • Advanced DNS Configuration
    • Domain Connection
      • Adding A Domain Name for Acceleration
      • Ownership Verification
      • Modifying CNAME Records
    • Domain alias
      • Overview
      • Configuration Guide
      • Batch Connecting SaaS Domain Names
      • Configuring Alias Domain Names for Disaster Recovery
    • Traffic Scheduling
      • Traffic Scheduling Management
    • Origin Configuration
      • Origin-pull configuration
        • Configuring Origin-Pull HTTPS
        • Host Header Rewrite
        • Controlling Origin-pull Requests
        • Redirect Following During Origin-Pull
        • HTTP/2 Origin-Pull
        • Range GETs
      • Load Balancing
        • Overview
        • Quickly Create Load Balancers
        • Health Check Policies
        • Viewing the Health Status of Origin Server
        • Related References
          • Load Balancing-Related Concepts
          • Introduction to Request Retry Strategy
      • Origin Group Configuration
      • Related References
        • ld Version Origin Group Compatible Related Issues
      • Collect EdgeOne origin-pull node IP
  • Edge Cache
    • Overview
    • EdgeOne Cache Rules
      • Content Cache Rules
      • Cache Key Introduction
      • Vary Feature
    • Cache Configuration
      • Custom Cache Key
      • Node Cache TTL
      • Status Code Cache TTL
      • Browser Cache TTL
      • Offline Caching
      • Cache Prefresh
    • Clear and Preheat Cach
      • Cache Purge
      • URL Pre-Warming
    • How to improve the Cache Hit Rate of EdgeOne
  • Rules Engine
    • Overview
    • Supported Matching Types and Actions
    • Rule Management
    • variables
이 페이지는 현재 영어로만 제공되며 한국어 버전은 곧 제공될 예정입니다. 기다려 주셔서 감사드립니다.

Cache Purge

Overview

When your resource content is cached to the EdgeOne edge node, during the cache validity period, users accessing the resource will be directly responded by the EdgeOne edge node without triggering a return to the origin. If your origin site updates the resource content at this time, in order to prevent users from still accessing the old resource files, you can manually clear the cached resources in all edge nodes by using the Cache Purge function. After the cache is cleared, when users access the resource, EdgeOne will follow the origin to obtain the latest resource for response.

Quota Description

Different billing plans have different quotas, please refer to: Comparison of EdgeOne Plans.

Use Cases

You may need to use this function in the following scenarios:
Content update: When you have updated some resources on the origin, but the cache on EdgeOne has not expired, you may want to let the client user see the latest content immediately.
Error fix: If there are some erroneous contents cached on EdgeOne from your origin, to avoid business risks, you need to purge these erroneous caches immediately to ensure that EdgeOne no longer provides the wrong content.
Testing and debugging: When developing and debugging a website, you may need to frequently modify and test the content. To ensure that you see the latest modified content rather than the cached old version, you can use the clear the cache function.
Emergency response: In some emergency situations, such as being attacked or releasing sensitive information, you need to remove the relevant content from EdgeOne immediately.
Cache Rules adjustment: When you adjust or optimize the EdgeOne Cache Rules, you may need to purge the existing cache to ensure that the new Rules are Effective immediately.

Support Type

EdgeOne clear the cache support based on various types of purging, details as follows:
Type
Details
URL
Match the node cache resources of the URL, for example, https://www.example.com/path/foo.jpg.
Directory
Match the node cache resources of the directory, for example, https://www.example.com/path/.
Hostname
Match the node cache resources of the Hostname, for example, www.example.com. Do not support submitting URLs in the format of *.test.com, that is, the domain name cannot contain wildcards, and the corresponding subdomains need to be specified.
Cache-Tag
Cache-Tag refresh is a method for quickly refreshing node caches. It allows you to refresh relevant content based on specific cache tags. In your website or application, you need to set cache tags for relevant content, which can be achieved by adding the Cache-Tag header in the HTTP response from the origin server.
After setting the cache tag, you can match the tag value of the Cache-Tag header in the HTTP response to clear the cache, for example, Cache-Tag: pic . When submitting a refresh, you can enter pic in the Tag(s) field to refresh all resources with the tag.
Only applicable to the Enterprise plan.
Cache-Tag usage instructions:
The maximum header size is 6 KB.
Multiple tags are separated by ",", a single tag does not exceed 128 characters, and the tag limitation is 1,000.
Tags are case-insensitive, that is, Tag1 and tag1 will be recognized as the same tag.
All Cache
All cache resources of the site on the node.
If a wildcard domain name (e.g., *.foo.example.com) is connected to the current site ( example.com), it is unable to take effect against all caches under the wildcard domain name. You need to submit separate tasks to clear the cache for each specific subdomain.
EdgeOne Cache Purge is divided into direct deletion and mark as expired methods, as follows:
URL Type and Cache-Tag Type are set to "directly delete" by default, which means directly deleting the cache content. When a user sends a request for resources, EdgeOne will immediately origin-pull the latest resources, increasing the number of origin-pull requests within a short time and weakening the acceleration effect. If a large amount of content is submitted, the origin will be under greater pressure.
Other purge types are set to "Mark as Invalid" by default, which means that the cache will not be directly deleted, but marked as expired. If the cache node has Last-Modified and Etag headers, the next time a user requests the resource, the node will carry If-None-Match and If-Modified-Since headers for origin-pull verification whether the resource has been updated. The response of 304 or 200 is determined by the origin, generally speaking:
If there is no update - the origin returns 304 (Not Modified), then the node continues to use the cache to respond, effectively saving bandwidth;
If there is an update - the origin returns 200 (OK), then the node collects the latest resources from the origin and compares the Last-Modified and Content-Length headers of the cached resources and the new resources. If either header value is different, the new resource will overwrite the expired cache on the node.
Note:
EdgeOne nodes differentiate cache based on the URL before and after encoding by default. Therefore, when refreshing, you need to submit them separately. If the URL contains special characters, then when submitting the URL refresh in the console:
https://example.com/d/default_avatar.png?x-oss-process=image/resize,w_600,1_800, the cache corresponding to the URL before encoding will be refreshed;
https://example.com/d/default_avatar.png?x-oss-process=image%2Fresize%2Cw_600%2C1_800, the cache corresponding to the URL after encoding will be refreshed.
A maximum of the first 10,000 records can be displayed for cache purge history query. If more records are needed, it is recommended to narrow down the query scope or click Export Records at the bottom of the list. Currently, up to 500,000 records can be exported.

Directions

Scenario One: Clear cache by entering content

If you have a small amount of content to clear and it is convenient to enter the content directly in the input box, you can follow these steps:
1. Log in to the EdgeOne console, and in the left sidebar, click Purge Cache.
2. On the cache purge page, select the corresponding site, choose the resource type to be cleared, enter the corresponding resource content, and click OK.

3. Switch to the History Records tab to view the history records of the specified time range (within the last month) and purge type.

Scenario Two: Clear cache by uploading a file for batch import

If you have a large amount of content to clear or have already placed the content in a file, you can choose to upload the file:
1. Log in to the EdgeOne console, and in the left sidebar, click Purge Cache.
2. On the cache purge page, select the corresponding site, choose the resource type to be cleared, choose the "Upload file" method, and after uploading, click OK.

3. Switch to the History Records tab to view the history records of the specified time range (within the last month) and purge type.

Related References