PHP code example of jrsaunders / quickcache

1. Go to this page and download the library: Download jrsaunders/quickcache 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/ */

    

jrsaunders / quickcache example snippets

 


$setupCache = new \QuickCache\Cache();
$setupCache->setCachePath('/var/a/place/on/my/server/for/chachefiles');


$cache = new \QuickCache\Cache();
$cacheData = $cache->getCacheData('mycachefilename', 30);
if(!$cacheData){
    $cacheData = //get data from DB;
    $cache->saveToCache('mycachefilename', $cacheData);
}

// use the $cacheData somehow!