1.0.0
Usage
Take any react/cache
implementation, like
wyrihaximus/react-cache-redis
we'll be using in this example.
Decorate it with a PSR16Adapter
instance, and you can use them as a PSR-16 cache within fibers. Directly, or with
other packages. Internally PSR16Adapter
uses await
on every method call to the
react/cache
implementation to make it compatible.
$cache = new PSR16Adapter(new Redis($reditClient, 'react:cache:your:key:prefix:'));
React\Async�sync(function () {
$cache->set('key', 'value'); // All methods use `await` internally to make any ReactPHP cache PSR-16 compatible
echo $cache->get('key'); // echos: value
})();
1.0.0
- Total issues resolved: 0
- Total pull requests resolved: 5
- Total contributors: 2
Bug 🐞
Dependabot 🤖
Enhancement ✨,Feature 🏗
- 1: Initial implementation thanks to @WyriHaximus
Enhancement ✨
- 6: Expand documentation thanks to @WyriHaximus
- 2: Correct composer description thanks to @WyriHaximus