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

Can miniredis be used in production server? #271

Closed
abc123xxxyh opened this issue Jun 11, 2022 · 3 comments
Closed

Can miniredis be used in production server? #271

abc123xxxyh opened this issue Jun 11, 2022 · 3 comments

Comments

@abc123xxxyh
Copy link

First,thanks for this useful library.

I will integrate unit test in jenkins.Both in test and production server,I want to run unit test first.If pass,then build the project.Otherwise,build fails.
If miniredis can't be used in production server, why?Cost,security,or others?
I just run unit test in production server in the process of jenkins build,not use miniredis really in production environment .

@alicebob
Copy link
Owner

If you use miniredis to check your production build, then that should work fine. But you'll need to run real production with a real redis. Miniredis generally implements things in the "simplest, super inefficient, but it gives the correct answer"-way. It simply doesn't expect many keys, or to run a long time. Also "key expiration" (TTL) doesn't work as it works in real redis: you need to call .FastForward() for the TTL checks to run.

@tra4less
Copy link

@alicebob maybe add a option initializing the server

@alicebob
Copy link
Owner

Maybe, but using miniredis as a real-ish server is (imo) out of scope for this project. It's a use case I can't/don't want to support.

@alicebob alicebob closed this as completed Jan 6, 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

No branches or pull requests

3 participants