PHP code example of kktsvetkov / kacho

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

    

kktsvetkov / kacho example snippets


/* Cache current $_SERVER array for one hour */
echo Kacho::open('/tmp/proba.php')->write($_SERVER, 3600)
	? 'Kacho caching is OK :)'
	: 'Kacho caching failed :(';

/* Read the cached $_SERVER array */
echo Kacho::open('/tmp/proba.php')->read($_SERVER);