dahomey-technologies / rustis

An asynchronous Redis client for Rust

Home Page:https://docs.rs/rustis

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using Redis Stack and Pool Feature

tehsunnliu opened this issue · comments

Hi, I was facing some trouble using Redis Stack and the pool features provided by this package. Is there any example or sample code where I can learn how to use those features of this package?

Thank you.

Hi @tehsunnliu,

The pool documentation is here with an example
https://docs.rs/rustis/latest/rustis/client/index.html#the-pooled-client-manager

About RedisStack, like any other high level commands, it is available in the commands module where commands are gathered in differents traits implemented by the Client struct:
https://docs.rs/rustis/latest/rustis/commands

You will find RedisStack documentation on the different specific traits, for instance JsonCommands for RedisJson or SearchCommands for RedisSearch.

Examples can be found in the test suite:
https://github.com/dahomey-technologies/rustis/blob/main/src/tests.
Each specific command trait should be tested here.

Which part of RedisStack do you want to use ?
I may help you on specific questions

Consider also using the multiplexed client instead of the pool.

Thank you so much @mcatanzariti for your reply and the sources you have provided. It's really helpful.

I'm trying to add the Redis Stack feature to the rocket_auth crate which currently supports MySQL, PostgreSQL, and SQLite. And uses Redis only for caching. Since I, recently came to know that Redis also supports Permanent data storage so I thought it will be a good time to learn Redis Stack and also implement this feature on the rocket_auth crate.

Don't hesitate if I can help you further