PHP code example of divineomega / do-file-cache

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

    

divineomega / do-file-cache example snippets




$cache = new \DivineOmega\DOFileCache\DOFileCache();

$cache->changeConfig(["cacheDirectory" => "/tmp/DOFileCacheStorage/"]);

$cache->set('nursery_rhyme',"Mary had a little lamb", strtotime('+ 1 day'));

$var = $cache->get('nursery_rhyme');