1. Go to this page and download the library: Download simbiat/htmlcache library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
#Create HTMLCache object
$HTMLCache = (new \Simbiat\HTMLCache($siteconfig['cachedir'].'html/'));
#Attempt to use cache
$HTMLCache->get('', true, true, true);
#Do some processing in case cache was not hit, to get $output
#Save to cache and output directly
if ($uri[1] === 'statistics') {
$HTMLCache->set($output, '', 604800, 600, true, true);
} elseif ($uri[1] === 'achievement') {
$HTMLCache->set($output, '', 259200, 600, true, true);
}
#Output page if not