Skip to content

Exponential CMS

Preloading caches

Warm a site's caches before visitors arrive, and find its broken links, with Setup > Preload or preload.php.

The cache preloader requests the pages of a site as an anonymous visitor would, so the caches are warm before the first visitor arrives, and it lists the broken links with the pages that link to them. Setup > Preload Sites in the administration and php bin/php/preload.php --apply are the same run.

Note: This is not PHP's opcache.preload, which Exponential does not use.

What a run does

  • It starts at the section pages of a site, then follows the site's links up to a page limit and a link depth.
  • It warms what rendering a page makes: the page view cache, the image aliases the page shows and the compiled templates. These are files shared by Apache with PHP-FPM and by Velocity, so one run warms both.
  • It never leaves the site: links to other hosts or siteaccesses, module views and files are not followed.
  • Only one run at a time; a second is refused.
  • Pages for signed-in users are not warmed.

From the administration

Choose the site (from RelatedSiteAccessList, without the administration), the page limit (250 by default, 1 to 5000) and the link depth (3 by default, 0 to 10), and optionally a check of every image on the warmed pages. Dry run shows the address, the starting pages and the limits without requesting anything. A run is started in the background, and the page follows it; you can leave and come back.

From the shell and cron

php bin/php/preload.php --siteaccess=site --dry-run
php bin/php/preload.php --apply --siteaccess=site
php bin/php/preload.php --apply --siteaccess=site --max-pages=20 --max-depth=1
php bin/php/preload.php --apply --siteaccess=site --images

The administration page shows the matching command and a crontab line for the choices in its form. Every run is recorded with its duration, pages warmed, image aliases made and broken links.

Velocity's response cache

Velocity keeps its own response cache in front of its workers, for velocity.ini [CacheSettings] DefaultTtl seconds (30 by default), so warming it ahead of visitors does not last. The page says when Velocity runs and how long its cache keeps a page.

Related commands

  • exp:warm requests every published page, with --limit and --concurrency.
  • exp:makestaticcache builds the static cache.

Last updated 11/26/2026. Something missing or wrong? Write to info@se7enx.com.