When supplying an option for MASTER_CACHEas shown here, if you do not supply a port (only the hostname), the Redis host is mistakingly interpreted as a unix socket rather than an IP or hostname.
I realize that this is because of https://github.com/sebleier/django-redis-cache/blob/master/redis_cache/utils.py#L41, and since it doesn't find :// in the server (for the scheme) or : for the port, then it assumes it's a unix socket. I personally feel like it would be more common to have unix:// as an indicator for a socket than having an IP without a scheme or port.
When supplying an option for
MASTER_CACHE
as shown here, if you do not supply a port (only the hostname), the Redis host is mistakingly interpreted as a unix socket rather than an IP or hostname.I realize that this is because of https://github.com/sebleier/django-redis-cache/blob/master/redis_cache/utils.py#L41, and since it doesn't find
://
in the server (for the scheme) or:
for the port, then it assumes it's a unix socket. I personally feel like it would be more common to haveunix://
as an indicator for a socket than having an IP without a scheme or port.Simple test: Set
"MASTER_CACHE": "localhost"
.