In OneThird CMS, although the sample snippet that provides the same functions as those of the cache-based plug-in that is used in WordPress had been shipped was canceled shipped in subsequent v1.3x
The reason, in OneThird CMS, is at a sufficiently high speed without using the cache plug-ins, because much sense does not operate as early as that does not change much with the php program to determine whether there is a cache
If, if you want to the speed of the site to high speed, please try the first CSS of the bind of either inlining
Please if still inadequate using the static output function
(Valid better compression and spline of the purpose if the layers to increase the perceived speed of the site)
If you really use the cache plug-ins, the following snippet / files / 1 / plugin / plugin / Please add to php
(In v1.2x system is the same as the snippet that had been included)
/* -- cache sample - */ // -- for site cache note: if you want more speedup, move this block to config.php. if (!isset($_COOKIE['otx0']) && !isset($_SESSION['login_id'])) { $path = $config['site_path'].DIRECTORY_SEPARATOR.'cache'; $f = trim($_SERVER['REQUEST_URI'],'/'); if (!$f) { $f = 'index.html'; } $f = $path.DIRECTORY_SEPARATOR.urlencode($f); if (is_file($f) && filectime($f) + 60*60 > time()) { $x = @file_get_contents($f); if ($x) { echo($x); exit(); } } } function cache_plugin(&$r) { global $params,$config; $r = rtrim($r); $x = substr($r,-7); $f = urlencode(trim($_SERVER['REQUEST_URI'],'/')); if (!$f) { $f = 'index.html'; } if ($x == '</html>') { $r = substr($r,0,-7)."<!-- {$params['request']} - $f - {$params['now']} -->\n</html>"; } $path = $config['site_path'].DIRECTORY_SEPARATOR.'cache'; if (!is_dir($path)) { mkdir($path); chmod($path, $config['permission']); } file_put_contents($path.DIRECTORY_SEPARATOR.$f, $r); }