Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No scheme and no port cause Redis host to be incorrectly read as unix socket #172

Open
particledecay opened this issue Sep 9, 2019 · 0 comments

Comments

@particledecay
Copy link

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 have unix:// as an indicator for a socket than having an IP without a scheme or port.

Simple test: Set "MASTER_CACHE": "localhost".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant