PHP code example of wyrihaximus / react-cache-psr-16-adapter
1. Go to this page and download the library: Download wyrihaximus/react-cache-psr-16-adapter 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/ */
wyrihaximus / react-cache-psr-16-adapter example snippets
$cache = new PSR16Adapter(new Redis($reditClient, 'react:cache:your:key:prefix:'));
React\Async\async(function () {
$cache->set('key', 'value'); // All methods use `await` internally to make any ReactPHP cache PSR-16 compatible
echo $cache->get('key'); // echos: value
})();