Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
D
Django-Redis-Cache
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shared
Django-Redis-Cache
Commits
87e615ee
Unverified
Commit
87e615ee
authored
Jan 23, 2020
by
Sean Bleier
Committed by
GitHub
Jan 23, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #170 from Jenselme/fix/ssl-connection
Fix establishing an SSL connection
parents
9382347b
93418732
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
connection.py
redis_cache/connection.py
+5
-2
utils.py
redis_cache/utils.py
+1
-1
No files found.
redis_cache/connection.py
View file @
87e615ee
from
redis.connection
import
UnixDomainSocketConnection
,
Connection
from
redis.connection
import
UnixDomainSocketConnection
,
Connection
,
SSLConnection
class
CacheConnectionPool
(
object
):
...
...
@@ -25,6 +25,7 @@ class CacheConnectionPool(object):
host
=
'127.0.0.1'
,
port
=
6379
,
db
=
1
,
ssl
=
False
,
password
=
None
,
parser_class
=
None
,
unix_socket_path
=
None
,
...
...
@@ -42,7 +43,9 @@ class CacheConnectionPool(object):
if
pool
is
None
:
connection_class
=
(
unix_socket_path
and
UnixDomainSocketConnection
or
Connection
unix_socket_path
and
UnixDomainSocketConnection
or
ssl
and
SSLConnection
or
Connection
)
kwargs
=
{
...
...
redis_cache/utils.py
View file @
87e615ee
...
...
@@ -114,7 +114,7 @@ def parse_connection_kwargs(server, db=None, **kwargs):
pass
if
url
.
scheme
==
'rediss'
:
url_options
[
'
connection_class'
]
=
SSLConnection
url_options
[
'
ssl'
]
=
True
# last shot at the db value
url_options
[
'db'
]
=
int
(
url_options
.
get
(
'db'
,
db
or
0
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment