Azion CLI warmup
Azion CLI command that crawls a site from a base URL and preloads its pages into Azion's cache, with every flag, its type, and its default.
The Azion CLI warmup command warms the cache of a site. It starts at a base URL, follows the links each page carries, and requests every URL it finds, so the content is in Azion’s cache before visitors ask for it. The options every command accepts, such as --format, --out, and -y, are on Global options.
Usage
azion warmup crawls the site from the URL you pass in --url:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--max-concurrent | — | int | 2 | Maximum number of requests the command sends at the same time. |
--max-urls | — | int | 1500 | Maximum number of URLs the command processes in one run. |
--timeout | — | int | 8000 | Time, in milliseconds, that the command waits for each request. |
--url | — | string | — | Required. Base URL where the crawl starts, with its scheme, such as https://example.com. The URL can carry a path, such as https://example.com/products. Without it, the command asks for the URL. |
The command requests the base URL first, reads the links on each page it receives, and adds every new link to a queue. The crawl ends when the queue is empty or when the command reaches --max-urls. At the end, a summary counts the URLs that succeeded and the URLs that failed.
In warmup, --timeout counts milliseconds for each request. It takes the place of the global --timeout option, which counts seconds.
Examples
Each example shows the command and the output it prints.
Warm the cache of a site
This command crawls a site from its home page with the default limits:
The command prints each URL it requests, the links it finds on that page, and a summary. In this example, the home page links to about.html, so the command requests both pages:
Limit the crawl
This command processes at most 5 URLs, sends one request at a time, and waits up to 3,000 milliseconds for each request:
The output opens with the limits the command applies, then the same crawl as the example above: