Closed ghost closed 4 years ago
This is a duplicate of #1. I'm going to close this issue since it's a duplicate.
This is a duplicate of #1. I'm going to close this issue since it's a duplicate.
It's not a duplicate. The library does not support rediss:// (see 2 ss) this is an redis in SSL mode
@senadibraimoski,
I see your point, however, issue #1 is to switch to django-redis-cache, update django-redis support or remove django-redis in favor of django-redis-cache. So, I would prefer any work being done to be done under issue #1.
My preference would be to just switch to django-redis-cache which seems to be the better library from what I can tell.
I am sorry to say but It looks like you do not know what you are talking about :) This library you are maintaining constructs django cache dictionary settings by parsing the connection string for a cache. It has nothing to do with anything django-redis-cache or django-redis or whatever.
The point is that the connection string you support for redis SSL strings in form for example
rediss://[:password]@localhost:6379/0
I did look over the history are you the original maintainer of the library or not? Do I need to create a PR for this and is there anyone who will fully grasp what I am saying here
I'm not sure you're completely understanding the bigger issue. Django-redis expects settings that are different from Django-redis-cache. For example here are the settings that django-redis needs taken from their docs:
CACHES = {
"default": {
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": "redis://127.0.0.1:6379/1",
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient",
}
}
}
And here is an example from django-redis-cache taken from their docs:
CACHES = {
'default': {
'BACKEND': 'redis_cache.RedisCache',
'LOCATION': [
'<host>:<port>',
'<host>:<port>',
'<host>:<port>',
],
'OPTIONS': {
'DB': 1,
'PASSWORD': 'yadayada',
'PARSER_CLASS': 'redis.connection.HiredisParser',
'CONNECTION_POOL_CLASS': 'redis.BlockingConnectionPool',
'CONNECTION_POOL_CLASS_KWARGS': {
'max_connections': 50,
'timeout': 20,
},
'MAX_CONNECTIONS': 1000,
'PICKLE_VERSION': -1,
},
},
}
You'll notice two distinct differences. They both expect something different for the location and the backend setting. We can add in support for Redis SSL, but I want to figure out if we're going to support both libraries or just one. I would rather support just one and my preference is on django-redis-cache.
No this is understandable - just the current library in its current state does not support the rediss://[:password]@localhost:6379/0 which as you can see in the django-redis docs is a supported format. The lib as it is on pypi is django-redis based. So at least then in your top readme if you are not going to maintain this makes a warning orr text for people not to use it and they can write few lines and parse the thing themselves - as I will do in my case.
I see there is no way to set a redis cache URL in an SSL form as supported by django-redis
rediss://....
Is there any other way to specify the SSL mode