Tiaro Cache

Building a page takes the server time: WordPress starts, reads the database and puts the page together. Tiaro Cache lets the LiteSpeed web server keep the finished page and hand it to the next visitor without starting WordPress at all.

The plugin works on LiteSpeed web servers only. On another server it is inactive, and the status says so. It contacts no outside service.

In this article: What Is Cached · What Purges the Cache · The Caches Screen · Settings · The Admin Bar Entry · The Crawler Guard · Privacy · Related

What Is Cached

Only visitors who are not logged in receive cached pages. Editors always see the live site. Never cached are the admin, AJAX and REST requests, search results, previews and password-protected posts, and any address with a query string other than the ignored tracking parameters.

A page is kept for one week by default. Pages that print a security nonce, which forms do, are kept for ten hours at most. “Not found” pages, feeds and sitemaps are kept for one hour.

What Purges the Cache

You do not have to clear the cache after editing. Changed content is dropped at once and rebuilt on its next view.

  • Saving, publishing, trashing or deleting a post purges its own page, its parent, its terms, the lists of its content type and the home page, and its translations.
  • Changes to terms and comments purge the pages they appear on.
  • Menus, widgets, theme options, layout sections, library elements and translations appear on every page, so they purge everything. So do plugin and theme updates.
  • The Tirenoa Reset Caches button purges every cached page as well.

The Caches Screen

Open Tirenoa › Caches. Without the Tirenoa theme it is under Settings › Tiaro Cache. The top shows the Status (Caching when all is well), the Web server, the Cache module, the Rules in .htaccess, the Crawler guard and Queued purges.

Under Actions:

  • Purge all pages drops every cached page.
  • Test the cache requests the home page twice and reports what the server answered. The second answer should come from the cache.
  • Write the .htaccess rules writes the plugin’s block of server rules again.

Settings

Setting What it does
Page cache Keep finished pages on the server switches caching on or off.
Keep pages for (hours) How long a page is kept at most.
“Not found” pages (minutes) 0 = never cache them. Caching them protects the database from bots scanning random addresses.
Feeds and sitemaps (minutes) 0 = never cache them.
Never cache these paths One per line. A path covers everything below it.
Ignored query keys Tracking parameters that do not change the page, such as utm_* or fbclid. A request carrying only these receives the cached page.
Crawler guard See below.
Debug header Sends an X-Tiaro-Cache header with each page, saying why it was or was not cached, for example no-cache,logged-in.

Save settings purges every cached page.

The Admin Bar Entry

While caching is active, the admin bar shows Page cache with Purge this page (on the website itself) and Purge all pages. Administrators see it by default. For the client user types of Tiaro Core you allow it with the row Purge the page cache under Users › Client Roles; that gives the admin bar entry, not the settings.

The Crawler Guard

Every request that is not answered from the cache has to be built. With Limit how many uncached pages crawlers may build at the same time ticked, a small file runs before WordPress connects to the database. Search engines may build three uncached pages at once, SEO tools and other bots one each. The rest are asked to come back later (503 with Retry-After). It also writes a short log line per built page to a folder on your server, without IP addresses.

Three further rules can be set in wp-config.php. Each knows 'count' (the default: nothing is refused, the log only marks what would have been), 'on' and 'off'.

Constant Rule when ‘on’
TIARO_GUARD_PROBES Addresses that cannot be a page, such as a missing .php file, .env, .sql or hidden folders, get “not found” without loading WordPress.
TIARO_GUARD_NOTFOUND An address that causes more than 30 “not found” answers within 10 seconds is paused for one minute. Missing images, styles and scripts do not count.
TIARO_GUARD_BURST A visitor who is not logged in and asks for more than 30 uncached pages within 10 seconds is paused for one minute. When 12 visitor pages are being built at once, the next one gets a short “busy” page that reloads by itself.

Note: Logged-in users are never limited. The numbers can be changed with further constants; TIARO_GUARD_DISABLE set to true switches the guard off. Ask Tiaro before changing these.

Privacy

Tiaro Cache makes no connection to any other server. The cached pages stay on your own web server, and the cache test only requests your own home page.