Tools

Prefetch content

Pre-populate files to a CDN cache before users requests. Prefetch is recommended only for files that more than 200 MB and less than 5 GB.

You can make one prefetch request for a CDN resource per minute. One request for prefetch may content only up to 100 paths to files.

The time of procedure depends on the number and size of the files.

If you need to update files stored in the CDN, first purge these files and then prefetch.

post/cdn/resources/{resource_id}/prefetch

Request

  • Base URL
    https://api.gcore.com
  • URL
    https://api.gcore.com/cdn/resources/{resource_id}/prefetch
  • Auth
    HTTP apikey

Path parameters

resource_idinteger required

CDN resource ID.

Request body

pathsstring[] required

Paths to files that should be pre-populated to the CDN.

Paths to the files should be specified without a domain name.

Example request

{
  "paths": [
    "/test.jpg",
    "test1.jpg"
  ]
}

Response

Successful.

Changes

No recorded changes to this operation across all 76 revisions of this API.