PHP code example of windomz / shmcache
1. Go to this page and download the library: Download windomz/shmcache 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/ */
windomz / shmcache example snippets
use SHMCache\Block;
use SHMCache\Cache;
// Use by Block, extends \SHMCache\shmop
$memory = new Block;
$memory->save('key1', 'value1');
$memory->save('key2', 'value2');
echo $memory->get('key1');
echo $memory->get('key2');
// Or use by Cache, same as Block, can not need to new it.
Cache::saveCache('key1', 'value1');
Cache::saveCache('key2', 'value2');
echo Cache::getCache('key1');
echo Cache::getCache('key2');