All Products
Search
Document Center

Edge Security Acceleration:Prefetch cache

Last Updated:Nov 28, 2025

The prefetch feature caches resources from your origin server to Edge Security Acceleration (ESA) points of presence (POPs). When a user first requests a resource, it is served directly from a POP. This avoids a trip to the origin server and improves the cache hit ratio.

Use cases

  • Promotional activities

    For large-scale promotional activities, you can prefetch static resources for the activity page to ESA POPs. After the activity starts, user requests for these resources are served directly from the POP.

  • Installation package releases

    Before you release a new version or an upgrade package, you can prefetch the resources to ESA POPs. After the product is officially launched, download requests from users are handled directly by the ESA POP. This increases download speeds, significantly reduces the load on your origin server, and improves the user experience.

Prefetch methods

ESA supports two prefetch methods: Instant Prefetch and Scheduled Prefetch.

  • Instant Prefetch: An immediate prefetch task starts as soon as you submit the URLs to quickly cache the resources on ESA POPs.

  • Scheduled Prefetch: A scheduled prefetch task starts at a specified time. You can also specify the prefetch frequency. This helps you avoid peak business hours, control theorigin traffic generated by prefetching, and reduce the load on your origin server.

Notes

  • After you submit a prefetch task, ESA POPs immediately fetch the required resources from your origin server. Therefore, submitting many immediate prefetch tasks at once creates many concurrent download tasks. This causes a spike in origin bandwidth and requests, which increases the load on your origin server. To prevent this, use the scheduled prefetch feature.

  • The time required for a prefetch task to complete depends on the size of the files being prefetched. A task typically takes 5 to 30 minutes to complete. The prefetch speed is faster for smaller files.

  • By default, prefetch requests include the Accept-Encoding:gzip header. To include other headers in prefetch requests or prefetch multiple replicas, you can use the PreloadCaches OpenAPI operation. Set the Header request parameter to customize the prefetch headers.

  • During prefetching, if the origin server returns a redirection status code, such as 301 or 302, the prefetch task fails because it does not follow the redirection. If your origin server returns a 301 or 302 status code, you must contact us to enable the 301/302 redirect for origin fetch feature.

  • When you submit URLs to be prefetched, if a URL contains non-ASCII characters, such as spaces, Chinese characters, or special characters, you must encode the URL. Otherwise, the content management system cannot recognize the task.

  • If the Tiered cache feature is configured for the edge caching layer, the prefetch cache feature does not work.

Procedure

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

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

  3. Choose a prefetch method to prefetch resources. ESA supports two methods: Instant Prefetch and Scheduled Prefetch.

    Immediate prefetch

    An immediate prefetch task starts as soon as you submit the URLs to quickly cache the resources on ESA POPs.

    You can use two input methods: Manual Input and Upload File.

    Input method

    Description

    Manual Input

    Enter the URLs to prefetch directly into the input box, and click Submit. You must specify the full path of each file. Enter one URL per line. You can enter up to 100 URLs at a time. For example:

    https://www.example.com/cat.jpg
    https://www.example.com/image/cat.jpg

    Upload File

    If you have many URLs to prefetch, you can add them to a .txt file and upload the file for a batch prefetch. You must specify the full path of each file. Enter one URL per line. The .txt file cannot exceed 10 MB in size.

    Scheduled prefetch

    A scheduled prefetch task starts at a specified time. You can also specify the prefetch frequency. This helps you avoid peak business hours, control the back-to-origin traffic generated by prefetching, and reduce the load on your origin server.

    1. Add the URLs that you want to prefetch to a .txt file. You must specify the full path for each URL and enter one URL per line. The .txt file cannot exceed 10 MB in size.

    2. Click Create Prefetch Task.

    3. Enter a custom name for the prefetch task, upload the file, and click Next.

      Note

      You can create up to 100 prefetch tasks.

      image

    4. Configure a prefetch schedule. You can set the prefetch time period, submission interval (a minimum of 1 second), and batch size (up to 100 URLs per batch) as needed.

      Note

      The total number of prefetch schedules cannot exceed 10.

      image

    5. Click OK.

  4. View the prefetch progress.

    After you submit a prefetch task, you can view the detailed records and progress of the task on the Prefetch Records tab. A progress of 100% indicates that the prefetch task is complete. Many prefetched items at once can slow the progress.

Availability

Prefetch method

Entrance

Pro

Premium

Enterprise

URL prefetch

Not supported

50,000

100,000

500,000