PHP code example of wruczek / php-file-cache
1. Go to this page and download the library: Download wruczek/php-file-cache 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/ */
wruczek / php-file-cache example snippets
use Wruczek\PhpFileCache\PhpFileCache;
e->refreshIfExpired("simple-cache-test", function () {
return date("H:i:s"); // return data to be cached
}, 10);
echo "Latest cache save: $data";