2024年8月2日

go-zero 使用 redis 作为 cache 的 2 种姿势

摘要: 在 go-zero 框架内,如在 rpc 的应用 service 中,其内部已经预置了 redis 的应用,所以我们只需要在配置中加入相关字段即可,另外,在 svcContext 声明 redis client 后即可在具体的业务逻辑处理中应用。 但这里有个问题,如我用的是 go-zero 1.5. 阅读全文

posted @ 2024-08-02 21:41 进击的davis 阅读(926) 评论(0) 推荐(1)

导航