Commit ad01964f authored by Sean Bleier's avatar Sean Bleier
parents f97ce688 18ea61fe
......@@ -183,7 +183,14 @@ class BaseRedisCache(BaseCache):
socket_timeout=self.socket_timeout,
socket_connect_timeout=self.socket_connect_timeout,
)
client = self.Redis(**kwargs)
# remove socket-related connection arguments
if kwargs.get('ssl', False):
del kwargs['socket_timeout']
del kwargs['socket_connect_timeout']
del kwargs['unix_socket_path']
client = redis.Redis(**kwargs)
kwargs.update(
parser_class=self.parser_class,
connection_pool_class=self.connection_pool_class,
......@@ -423,8 +430,8 @@ class BaseRedisCache(BaseCache):
There are three timeouts you can specify:
``timeout``: Time in seconds that value at ``key`` is considered fresh.
``lock_timeout``: Time in seconds that the lock will stay active and prevent other threads or
processes from acquiring the lock.
``lock_timeout``: Time in seconds that the lock will stay active and prevent other threads
or processes from acquiring the lock.
``stale_cache_timeout``: Time in seconds that the stale cache will remain after the key has
expired. If ``None`` is specified, the stale value will remain indefinitely.
......
......@@ -24,6 +24,7 @@ class CacheConnectionPool(object):
client,
host='127.0.0.1',
port=6379,
ssl=False,
db=1,
ssl=False,
password=None,
......
......@@ -6,7 +6,6 @@ from django.utils.encoding import force_text
from six import python_2_unicode_compatible, string_types
from six.moves.urllib.parse import parse_qs, urlparse
from redis._compat import unicode
from redis.connection import SSLConnection
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment