PHP code example of treehouselabs / cache
1. Go to this page and download the library: Download treehouselabs/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/ */
treehouselabs / cache example snippets
$driver = new RedisDriver($redis);
$serializer = new JsonSerializer();
$cache = new Cache($driver, $serializer);
$cache->set('foo', 'bar', 60);
$cache->get('foo');
$cache->has('foo');
$cache->remove('foo');