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
f90b8e24
Commit
f90b8e24
authored
Oct 11, 2020
by
Tomi Suomela
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
try_delete: key name fixed
parent
9ff68794
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
base.py
redis_cache/backends/base.py
+2
-1
No files found.
redis_cache/backends/base.py
View file @
f90b8e24
...
...
@@ -509,7 +509,8 @@ class BaseRedisCache(BaseCache):
@
get_client
(
write
=
True
)
def
try_delete
(
self
,
client
,
key
):
"""Remove a key from the cache if not locked."""
lock
=
cache
.
lock
(
key
,
timeout
=
5
)
lock_key
=
"__lock__"
+
key
lock
=
cache
.
lock
(
lock_key
,
timeout
=
5
)
acquired
=
lock
.
acquire
(
blocking
=
False
)
if
acquired
:
try
:
...
...
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