A hevaily changed version of the excellent theme cache plugin by ron4mac ( https://coppermine-gallery.com/forum/index.php/topic,80231.0.html ), this was created by myself and one of the graduates where I work, Jenny. To be fair, she did most of the work here.
*
* Caches index.php and thumbnails.php for visitors who are not logged in.
* Based on Theme Cache 1.1 by {ron4mac}.
*
* Changes and additions in this extended version.
* - cache is checked at 'page_start' (before the page's own queries) instead of in pageheader(),
* which on index.php runs only after all the work is done
* - pages are saved from the core 'page_html' filter, so error pages (cpg_die) are never cached
* - cache key built from a whitelist of parameters plus language, theme, sort order and cookie consent;
* any other parameter (search, lang=, theme=, file=, uid=, ...) disables caching for that request
* - favourites, random, search and other per-visitor meta albums are never cached
* - atomic writes, stale-while-revalidate (one request rebuilds an expired page, others get the old copy)
* - Last-Modified / 304 support
* - cache cleared after uploads, edits, deletes, comments and any admin form submission
* - expired files removed automatically, number of files capped
* - optional .htaccess static mode: Apache serves guest pages with no PHP and no MySQL connection
If you have the original version of Theme Cache installed, follow the instructions in the readme for migrating to this. The naming has been kept the same as having two different versions installed at the same time would cause problems.