miniredis
miniredis copied to clipboard
Can miniredis be used in production server?
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 .
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 maybe add a option initializing the server
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.