PHP code example of nabeelalihashmi / lightcache
1. Go to this page and download the library: Download nabeelalihashmi/lightcache 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/ */
nabeelalihashmi / lightcache example snippets
$cache = new IconicCodes\LightCache\FilesCache;
$cache->cachedir = __DIR__ . "/cache";
$cache->get('key', function () {
return ["value", time() + 10]; // cache for 10 seconds
});
$cache->delete('key');