In the redis python client documentation most examples have db=0 passed in constructor parameters. https://pypi.python.org/pypi/redis
What is the use of db=0 and in what case should i use other values instead of 0?
import redis
redis_client = redis.Redis(host='localhost', port=6379, db=0)
There are 16 databases that a redis server starts up with. They are labeled 0-15. If you chose to and organized your data accordingly, you could manipulate data in each of these. When connecting, you need to choose one. The default choice is db=0
. However, it could have been any number in the range 0-15.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments