PHP code example of cjrasmussen / data-cache-handler

1. Go to this page and download the library: Download cjrasmussen/data-cache-handler 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/ */

    

cjrasmussen / data-cache-handler example snippets


use cjrasmussen\DataCacheHandler\DataCacheHandler;

$dataCacheHelper = new DataCacheHandler('/home/cjrasmussen/scripts/.cache/');

$dataCacheHelper->initialize(__FILE__);

$cache = $dataCache->readSerialized();

$cache[] = 'Some new item to cache';

$dataCacheHelper->writeSerialized();