I'm new to django_redis lib. I'm using this confs for session store with redis:
...
CACHES = {
"default": {
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": "redis://127.0.0.1:6379/1",
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient",
},
"KEY_PREFIX": ""
}
}
SESSION_ENGINE = 'django.contrib.sessions.backends.cached_db'
SESSION_CACHE_ALIAS = "default"
...
Everything seems to work properly. But, when i check the key for a session on the database (default sqlite) and then compare that key value with the redis db in redis-cli, the session key are diferent. In the redis-cli version the session key has a prefix, even when I set no prefix.
DB (sqlite) Version of Session Key
skxn0oqp3goeipt6hnwvpeyp83hhoao0
redis-cli version of the key
127.0.0.1:6379[1]> keys *
1) ":1:django.contrib.sessions.cached_dbskxn0oqp3goeipt6hnwvpeyp83hhoao0"
127.0.0.1:6379[1]>
Is this normal ?