I'm attempting to use django-redis using Unix sockets rather than a TCP connection:
This is the settings.py
configuration:
CACHES = {
'default': {
'BACKEND': 'redis_cache.cache.RedisCache',
'LOCATION': 'unix:/tmp/redis.sock:1',
'OPTIONS': {
'PASSWORD': '',
'PICKLE_VERSION': -1, # default
'PARSER_CLASS': 'redis.connection.HiredisParser',
'CLIENT_CLASS': 'redis_cache.client.DefaultClient',
},
},
}
and this is an extract of the redis config file at /etc/redis/6379.conf
:
# Specify the path for the unix socket that will be used to listen for
# incoming connections. There is no default, so Redis will not listen
# on a unix socket when not specified.
#
unixsocket /tmp/redis.sock
unixsocketperm 755
Still I receive a ConnectionInterrumped
exception, which stands for an error during connection. Any ideas about what this configuration's issue is?
P.S. My Django version is 1.5.1
, django-redis is 3.3
and hiredis is 0.0.1
.