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
Proper way to handle RedisConnection after sending commands #5
Comments
Nice to hear that you find inspiration in this particular libraray. In general I had in mind that single connection is used among multiple users/clients. Alternatively, you can write your own wrapper around connector. That is. Some sketch code.
Use of such interface can go wrong if future returned from func is not last future, that can frequently happen if return is forgotten, but less likely if async is used. |
Thanks for your advice. Now, I think i can make different approach. Still a little bit confused about async/await operation. I'll close this issue as my concern is cleared. |
Single connection gives better performance. Thus, I try to implement RedisCacheDriver to work in same way.
First, thank you for great library that made me keep studying Dart with Redis!
Writing codes for wrapper to use like Map object, I made simple Function to deal with async calls:
(Part of whole code. If you are interested in it, please watch it at here.)
What I wonder is, 'close' may be required when 'connect' exists. And I found function 'close' on connection.dart file. I understood it closes socket connection. But there's no example code calling 'close' after operation.
How do I handle RedisConnection properly? Isn't it necessary to handle RedisConnection manually?
The text was updated successfully, but these errors were encountered: