PHP code example of kba-team / cache
1. Go to this page and download the library: Download kba-team/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/ */
kba-team / cache example snippets
//create object to access the redis server
$redis = \kbATeam\Cache\Redis::tcp('redis-server', 10);
//store value in redis server
if (!$redis->has('hello')) {
$redis->set('hello', 'Hello World!');
}
//retrieve value from redis server
echo $redis->get('hello');