Skip to main content

Upload files to cache

Last update:

Cache preloading (pre-loading) allows content to be loaded into the CDN resource's cache before a user request is received. This reduces the time it takes to transfer content when the first request is made to the CDN resource. Preloading may be necessary before a planned high load on the content source, such as before a sale, or to quickly update files in the cache.

Cache preloading is supported for files up to 5 GB.

Preloading can be performed no more than once per minute.

  1. If you want to update the files in the cache, clear the cache. Clearing the cache will remove the current cached versions.

  2. In the Control Panel, on the top menu, click Products and select CDN.

  3. From the menu of the resource, select Preload Cache.

  4. Specify relative paths to the files to be loaded into the cache. To add relative paths correctly, compose them according to the rules of composing a relative path. Specify each path on a new line. You can add no more than 10 paths at a time.

  5. Click Preload Cache. During preloading, the resource will be in PROCESSING status . The preload will be completed when the share changes to ACTIVE status.

Relative path rules

Specify * or / characters at the beginning of the path. The * character replaces any number of characters.

In a single path, you can specify a specific file, directory, or group of files with the same extension.

All versions of one file

File path:

/path/to/file.jpg

File with query parameter

The path to the file with the query parameter:

/path/to/file.jpg?VERSION

Directory files

A path mask without a domain name that is wrapped in the * operator:

*/path/to/directory/*

Files with a specific extension

The * operator and file extensions:

*.jpg

Directory files with a specific extension

A path mask without a domain name, which is wrapped in the * operator, specifying the extension:

*/path/to/directory/*.jpg

Relative path example

Suppose you want to remove the file.jpg file in the specified directory from the cache, as well as all .jpg files contained in the directory and its child folders. In this case, the list of links will look like this:

/path/to/file.jpg
*/directory/*.jpg