我正在尝试使用生菜向 Redis 添加地理位置。我设法使用同步方法来做到这一点。
是否可以使用 lettue 的异步 api 转换此逻辑?
同步码:
StatefulRedisConnection<String, String> connection= client.connect();
RedisCommands syncCommands=syncCommands = connection.sync()
long result = syncCommands.geoadd(key, longitude, latitude, userId);
您如何将其转换为异步调用?
谢谢,雷。