PHP code example of ko / json-cache

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

    

ko / json-cache example snippets


composer 

  $KOCacheSettings = new \KO\Cache\Settings();
  $KOCacheSettings->setValidity(15);
  $KOCacheSettings->setFile('data_cache.json');

  $KOCache = new \KO\Cache\Cache($KOCacheSettings);