I have an aiohttp application(back-end). And I'm using Redis for storing some data. What's the best way to manage Redis connection:
- Create one when application starts and use it everywhere I need it, so just create one, place it globally and use it in the all methods I need it
- Every time I need to do something in Redis(insert/read/delete and so on) create a connection, do an action, close the connection.
What's the best one and why? Could you provide some arguments. Thanks in advance.