Skip to the content
Documentation

exp:preload

No ratings yet

Available since Exponential 6.0.15 (in development, not in a release yet).

Summary

Warm the page caches of a site: request its section pages, then follow its links, and report the broken ones (dry run unless --apply)

Usage

./console exp:preload [options]
php bin/php/preload.php [options]

Help

The output of ./console help exp:preload (the script run with --help), without the standard options:

Usage: bin/php/preload.php [OPTION]...
Exponential cache preloader

Requests the section pages of a site, then follows its links, so the caches are warm
before a visitor arrives, and reports the broken links with the pages that link to them.
The site is the one of --siteaccess (or --target). One preload runs at a time; the run is
listed in Setup > Preload.
Without --apply nothing is requested: the script prints the address, the starting pages and
the limits. --dry-run means the same as no flag; --apply together with --dry-run is a usage
error (exit 2).

Usage: php bin/php/preload.php --siteaccess=<name> [--max-pages=<n>] [--max-depth=<n>] [--images] [--apply]

Example: php bin/php/preload.php --siteaccess=site
         php bin/php/preload.php --siteaccess=site --apply


Options:
  --apply            request the pages (the default is a dry run that prints the plan and requests nothing)
  --dry-run          the default, kept for scripts that pass it: print the plan, request nothing
  --target=VALUE     the siteaccess whose site is preloaded (default: the one of --siteaccess)
  --max-pages=VALUE  most pages to request (default 1000, at most 5000)
  --max-depth=VALUE  most links to follow from a starting page (default 3)
  --images           also request the images the warmed pages show, and report the missing ones

Options

Option Value Description
--apply - request the pages (the default is a dry run that prints the plan and requests nothing)
--dry-run -  
--target required the siteaccess whose site is preloaded (default: the one of --siteaccess)
--max-pages required most pages to request (default
--max-depth required  
--images -  

Standard options

Every script also takes the standard options of the script framework: --help, --quiet, --siteaccess, --debug, --colors, --no-colors, --logfiles, --no-logfiles, --verbose and --allow-root-user.

Source

bin/php/preload.php, kernel/private/classes/commands/preload.php

See also

Generated example: exp:preload

Added to the reference for Exponential 6.0.15.

Contributors

Comments

Add a comment

Comments are read by a moderator before they appear.