Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,113 of 9,113 pages
About the help in other languages
All help pages

Alerts, availability, maintenance mode and static cache

How an emergency service keeps incident information online with Exponential - caches and the static cache for load, what keeps serving when PHP or the database fails, maintenance mode and its interplay with caches…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/government/levels/emergency-services/alerts-availability-maintenance-and-static-cache.md

On this page

Alerts, availability, maintenance mode and static cache

This page is for administrators, project managers and website creators of an emergency service, or any public body whose site must stay up when it matters most. It explains the tools Exponential has for load and failures, how they interact with publishing an urgent update, and what the product does not do. Every behavior below is documented in the pages linked; test each on your own installation before an incident tests it for you.

Warning

.htaccess slows down every request. When .htaccess files are enabled (AllowOverride anything but None), let alone used, Apache looks for them and reads and evaluates them on every request, in every directory of the path, and page loading times go up drastically (measured). The only real fix is to switch the feature off for the virtual host: AllowOverride None in the HTTPS virtual host, and the rules in the virtual host's own configuration as mod_rewrite rules. That is far faster in production speed tests and well worth the time it takes to optimize a production configuration. Switch over right away: copy the rules of the example HTTPS virtual host into your virtual host (with the static cache, also staticcache_offload.conf), set AllowOverride None, run apachectl configtest, reload Apache and test the site. The same rules for other servers: nginx, LiteSpeed, Caddy, IIS, Velocity (built in); where virtual host rules go in a control panel: Plesk, cPanel, DirectAdmin, ISPConfig. On LiteSpeed or OpenLiteSpeed, the server's own page cache can also answer anonymous visitors and crawlers without PHP: Page caching with LiteSpeed and OpenLiteSpeed.

The maintenance window shows visitors a page while the administration stays reachable
The maintenance window shows visitors a page while the administration stays reachable

Contents

  1. The layers
  2. The static cache
  3. Publishing an update through the caches
  4. Maintenance mode
  5. When things fail
  6. What the product does not do

The layers

LayerWhat it doesCleared or refreshed byRead
View cachestores rendered content pagespublishing (the object and related pages), Clear cache on a nodeCaches
Static cachepages stored as plain files the web server sends without starting Exponentialpublishing refreshes touched pages; Setup > Cache management, Static content cacheStatic cache generator
Velocity response cacheresponses held by the Velocity web server./console exp:velocity cache clear --applyVelocity response cache
CDN or reverse proxycopies at the edgethe CDN's purgeHTTP caching and CDNs

The static cache

  1. Generate it in Setup > Cache management, Static content cache: pick the site, a page limit and a link depth, press Create new, watch the stored pages. Or from a shell: php bin/php/makestaticcache.php --site=<siteaccess>.
  2. Serve it: with Apache and .htaccess, copy .htaccess_root_static to .htaccess; with a virtual host, use the rules of doc/eng-us/examples/staticcache_offload.conf.
  3. A request is answered from a file only when it is a plain GET or HEAD without a query string and without a session; forms, searches and signed-in users get the live page.
  4. Settings are in settings/staticcache.ini [CacheSettings]: CachedURLArray[] (what is cached), AlwaysUpdateArray[] (refreshed on every publish, / by default), MaxCacheDepth (12).

Put the front page and the Incidents folder in what is cached and in AlwaysUpdateArray[], so every incident update refreshes them.

Publishing an update through the caches

StepWho
Publish the Incident updatethe on-call publisher
View cache of the object and related pages clearedautomatic
Static pages touched by the publish, and AlwaysUpdateArray[] pages, refreshedautomatic, during the publish (unless CronjobCacheClear=enabled defers it to the staticcache_cleanup cronjob part)
Velocity response cacheexpires by its lifetime, or clear it: ./console exp:velocity cache clear --apply
CDNexpires by its lifetime, or purge
Check logged out, on a phone, with a fresh browserthe publisher or a second person

Measure the whole chain in a rehearsal: the time from Send for publishing to the update being visible to an anonymous visitor on every path your visitors use.

Maintenance mode

Setup > Maintenance (or php bin/php/maintenance.php on --message="..." --until=2h --allow-admin) takes the public site offline: page requests get a maintenance page with status 503, Retry-After and no-store; images, styles and scripts are still served; the administration stays reachable with --allow-admin. It never ends by itself (Maintenance mode).

InteractionEffect
Velocity's response cachepaused while maintenance is on; every request reaches index.php
The application's HTTP cacheits directories are moved aside when maintenance is switched on and off
The static cachethe offload rules in .htaccess_root_static and doc/eng-us/examples/staticcache_offload.conf contain no check for the maintenance marker, so static files keep being served by the web server during maintenance
A CDNdoes not store the maintenance page, may keep older copies; purge after the window if content changed

During an incident, the last two rows matter: if you must take the CMS offline for repairs, cached static pages and CDN copies of the incident information can keep serving visitors. Decide in advance whether that is what you want, and avoid maintenance windows during periods of high risk. If maintenance must show a special page, a theme can supply errors/maintenance.html (self-contained, no template code).

When things fail

FailureWhat keeps workingWhat to do
PHP or the database failsstatic cache files served by the web server; CDN copiesrestore the service; the static pages show the state at the last refresh
Load far above the testcached pages; Velocity if usedreduce dynamic pages: send visitors to the cached incident page; consider maintenance mode only as a last resort
The administration is unreachablethe public site from cachespost updates through your other channels; publish when back
The hosting site is lostnothing in the productyour failover plan: a second site, DNS, a CDN that serves stale copies
Maintenance switched on and you cannot get back indelete var/maintenance.json, as the maintenance guide's way back describes

What the product does not do

  • No automatic failover between servers or data centers.
  • No dedicated alert or broadcast system; incident updates are content.
  • No push to phones; notifications are e-mails to followers after the next notification run.
  • No uptime monitoring of the public site; use an external monitor.

Covering these is part of your hosting and operations design (Operating a site, Hosting companies start here).

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x