Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use github.com/rueian/rueidis as Redis client and abstract RedisCache interface #249

Merged
merged 1 commit into from
Apr 2, 2023

Conversation

alimy
Copy link
Collaborator

@alimy alimy commented Apr 2, 2023

  • use github.com/rueian/rueidis as Redis client
  • abstract redis cache interface
  • use redis-stack in docker-compose.yaml

为什么使用 github.com/rueian/rueidis

  • 单个库 就可以 支持 Redis Cluster, Sentinel, RedisJSON, RedisBloom, RediSearch, RedisTimeseries, etc. 后续计划实现使用RediSearch作为全文搜索引擎的推文搜索服务,作为除基于Zinc/Meilisearch推文搜索服务外的另一轻量级实现;
  • Client side caching in RESP3
  • 够用、好用;

为什么使用 redis-stack

  • 香嘛,好用就上呗;
  • 生产环境可以根据自己的需求部署Redis,并正确加载所需要的模块;

使用docker compose运行一个redis-stack实例:

docker compose up -d redis

visit http://localhost:8001 to use RedisInsight👀

配置变化

旧的Redis配置项

    ...
    Redis:
      Host: redis:6379
      Password: 
      DB: 

新的Redis配置项

    ...
    Redis:
      InitAddress:
      - redis:6379
      Username:
      Password:
      SelectDB:
      ConnWriteTimeout: 60   # 连接写超时时间 多少秒 默认 60秒

@alimy alimy merged commit 9e0e6f7 into rocboss:dev Apr 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant