Purge by directory

更新时间:
复制 MD 格式

Purging by directory removes cached content from specified directories. This ensures users receive the latest file versions.

Use cases

  • Purging all cached files in a specific directory, such as the /assets/images/ directory.

  • Updating all content for a specific module or section of your site.

  • Purging all related resources after a project update or version release.

Procedure

  1. In the ESA console, click Websites. In the Website column, click the target site.

  2. In the left navigation pane, choose Caching > Purge Cache.

  3. On the Purge Cache tab, configure the purge settings.

    • Type: Select By Directory.

    • Input Method:

      • Manual Input: Enter the URLs to refresh in the input box. Each URL must be a directory path that ends with a forward slash (/). Enter one URL per line. You can enter a maximum of 100 URLs at a time. For example:

        https://www.example.com/
        https://www.example.com/image/
        https://www.example.com/image/cat/
      • Upload File: If you have a large number of URLs to refresh, you can add the URLs to a TXT file and then upload the file to refresh them in a batch. A directory path must end with a /. Enter one URL per line. The size of the TXT file cannot exceed 10 MB.

    • Purge Method: You can choose between two methods: Mark as Expired and Delete.

      Refresh method

      Description

      Mark as Expired

      Nodes are processed according to the following flow:

      1. The ESA POP sends an origin request with the If-Modified-Since request header.

      2. The origin server compares the file modification time.

      3. If the file is not modified, the origin server returns a 304 status code. The ESA POP can then use the existing cache file to respond to the client request.

      4. If the file is modified, the origin server returns a 200 status code and the latest file. The ESA POP returns the latest file to the client and caches the resource.

      Delete

      If a user requests content that matches a resource to be refreshed, the ESA POP directly fetches the new resource from the origin, returns it to the user, and caches the new resource.

    image

  4. Click Submit.

  5. View the purge progress.

    • After submitting a purge task, you can view its details and progress on the Purge Records tab. A progress of 100% indicates the task is complete. Purging many files may take longer.

    • If you select Upload File, you can check the file's execution status on the Upload Records tab. A 'Success' status indicates the file was uploaded and the purge task has started. You can then monitor the status of each URL on the Purge Records tab.

      image

Limitations

Limit

Free

Basic

Standard

Advanced

Enterprise

Daily quota limit

50 tasks

100 tasks

1,000 tasks

1,000 tasks

2,000 tasks