/ Published in: PHP
A simple class to cache files (or other results) with PHP.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php /** * Class Cache * * @author Koen Ekelschot * @license WTFPL */ class Cache { private $cachedFile; public function __construct($identifier) { } public function cacheExists($maxAge) { return true; } else { $this->invalidateCache(); } } return false; } public function getCachedCopy() { } public function getCachedFilename() { } public function cacheResult($result) { $this->invalidateCache(); } } private function invalidateCache() { } } ?>