PHP code example of rodrigoalviani / php-simple-cache

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

    

rodrigoalviani / php-simple-cache example snippets



$cache = new Rodrigoalviani\Cache\Cache($label);

$cache = new Rodrigoalviani\Cache\Cache($_SERVER['REQUEST_URI']);
$cache->cacheInit();

// your page here

$cache->cacheEnd();

$cache = new Rodrigoalviani\Cache\Cache($_SERVER['REQUEST_URI']);
$cache->set_filePath('tmp/');
$cache->set_cacheMaxAge(84600);
$cache->set_cacheExtension('.tmp');
$cache->cacheInit();

// your page here

$cache->cacheEnd();
javascript
{
    "alviani/php-simple-cache": "~0.1"
    }
}