💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
# 异步Redis客户端 `Swoole-1.8.0`版本增加了对异步Redis客户端的支持,基于redis官方提供的[hiredis](https://github.com/redis/hiredis)库实现。Swoole提供了`__call`魔术方法,来映射绝大部分Redis指令。 编译安装hiredis ---- 使用Redis客户端,需要安装hiredis库。下载`hiredis`源码后,执行 ```shell make -j sudo make install sudo ldconfig ``` * hiredis下载地址:<https://github.com/redis/hiredis/releases> 启用异步Redis客户端 ---- > 4.2.x 中 `redis-client` 即是 异步redis客户端开启, 并非无法开启, 以实际使用为准 编译swoole时,在`configure`指令中加入`--enable-async-redis` ```shell ./configure --enable-async-redis make clean make -j sudo make install ``` 可能遇到的问题 ---- `php-m` 发现swoole消失或者是通过`php --ri swoole`没有显示`async redis client` 或 `redis client` ```shell vi ~/.bash_profile 在最后一行添加 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib source ~/.bash_profile ``` 重新编译安装swoole即可