1234567891011121314 |
- <?php
- Co::set(['hook_flags' => SWOOLE_HOOK_ALL ^ SWOOLE_HOOK_TCP]);
- go(function () {
- $redis = new Swoole\Coroutine\Redis;
- $ret = $redis->connect('host.docker.internal', 6379);
- // $redis->auth('root');
- // $redis->set('key', 'swoole redis work');
- // var_dump($redis->get('key'));
- $key = 'test_cache_data';
- $ret = wkcache($key, ["hello world"]);
- $data = rkcache($key);
- });
|