Redis

Redis Connection

For every application running, a dedicated redis namespace is created and this namespace can be used exclusively by that application. This framework uses redis-py for managing redis connections. The client can choose their own redis client library. The URL to access the redis can be found in cfg.CONF.redis.url (see configs).

The redis connection from redis-py module can be accessed from

aalam_common.redis.redis_conn

The redis commands are like methods call on the connection object, Ex, brpoplpush command can be issued by

aalam_common.redis.redis_conn.brpoplpush(src, dst, timeout=0)

The namespace for every application can be accessed by only that application. The values in an application’s namespace will not collide with other application’s keys.

Some commands like config_get, flushall, etc will not work.