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
ad01964f
Commit
ad01964f
authored
Apr 15, 2020
by
Sean Bleier
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/BureauxLocaux/django-redis-cache
parents
f97ce688
18ea61fe
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
4 deletions
+11
-4
base.py
redis_cache/backends/base.py
+10
-3
connection.py
redis_cache/connection.py
+1
-0
utils.py
redis_cache/utils.py
+0
-1
No files found.
redis_cache/backends/base.py
View file @
ad01964f
...
...
@@ -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.
...
...
redis_cache/connection.py
View file @
ad01964f
...
...
@@ -24,6 +24,7 @@ class CacheConnectionPool(object):
client
,
host
=
'127.0.0.1'
,
port
=
6379
,
ssl
=
False
,
db
=
1
,
ssl
=
False
,
password
=
None
,
...
...
redis_cache/utils.py
View file @
ad01964f
...
...
@@ -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
...
...
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