Guest page caching
With the previous changes in mind, we can still do more to reduce the overhead from this significant portion of your visiting users. Most of these guests have something in common - they're all viewing exactly the same content. They all have the same permissions and there is no user specific UI elements, but we still go through the full motions of fetching all of the data and rendering it for each and every user on each and every page they visit.
This is slightly wasteful on server resources so it makes a lot of sense to cache the page output and return the cached output for these users. Therefore, full page result caching can be enabled for guests. This takes into account the selected language and style, if you have multiple, and handles things like ensuring the correct CSRF (security) token is applied.
Guest page caching is enabled via the config.php file and uses a distinct cache "context" to avoid issues that may occur if you put page cache data into the same bucket as sessions. By default, most pages will be cached, though this can be opted-out as necessary in PHP code. However, advanced users can control what routes are cached via prefix or a regular expression. By default, pages are cached for 5 minutes to balance speed against recency, though this can be changed. (Very advanced users will have access to configure some of the page cache options programmatically.)
When serving a guest page, by default, we will record the correct "session activity" record to maintain your online user counts as before, though for users after more speed, this can be disabled. With this disabled, depending on your exact configuration, no database connection may be necessary to serve a cached page.
In basic tests, pages have been served from the cache in less than 0.01 seconds. Your mileage may vary, of course, but these kinds of savings will represent a significant improvement in handling guest requests on a busy server.