PHP code example of mag310 / simple-file-cache
1. Go to this page and download the library: Download mag310/simple-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/ */
mag310 / simple-file-cache example snippets
$cache = new FileCache();
$cache->set('custom_key', 'sample data');
$data = $cache->get('custom_key');
$cache->delete('custom_key');
$category = 'category';
$cache = new FileCache();
$cache->set($category . '/key1', 'data1');
$cache->set($category . '/key2', 'data2');
$cache->delete($category);