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
51a3843f
Commit
51a3843f
authored
May 17, 2010
by
Jannis Leidel
Committed by
Sean Bleier
May 29, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Another minor change to only call mset if there are actual keys to set.
parent
7fcb542a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
cache.py
redis_cache/cache.py
+3
-2
No files found.
redis_cache/cache.py
View file @
51a3843f
...
...
@@ -141,8 +141,9 @@ class CacheClass(BaseCache):
for
key
,
value
in
data
.
iteritems
():
safe_data
[
self
.
prepare_key
(
key
)]
=
base64
.
encodestring
(
pickle
.
dumps
(
value
,
pickle
.
HIGHEST_PROTOCOL
))
.
strip
()
self
.
_cache
.
mset
(
safe_data
)
map
(
self
.
expire
,
safe_data
,
[
timeout
]
*
len
(
safe_data
))
if
safe_data
:
self
.
_cache
.
mset
(
safe_data
)
map
(
self
.
expire
,
safe_data
,
[
timeout
]
*
len
(
safe_data
))
def
close
(
self
,
**
kwargs
):
"""
...
...
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