miniredis icon indicating copy to clipboard operation
miniredis copied to clipboard

Can miniredis be used in production server?

Open abc123xxxyh opened this issue 3 years ago • 3 comments

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 .

abc123xxxyh avatar Jun 11 '22 09:06 abc123xxxyh

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.

alicebob avatar Jun 11 '22 09:06 alicebob

@alicebob maybe add a option initializing the server

tra4less avatar Aug 17 '22 09:08 tra4less

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 avatar Aug 18 '22 14:08 alicebob