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
d739c23e
Commit
d739c23e
authored
May 08, 2010
by
Jannis Leidel
Committed by
Sean Bleier
May 12, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify get() slightly.
parent
fc404efa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
cache.py
redis_cache/cache.py
+9
-9
No files found.
redis_cache/cache.py
View file @
d739c23e
...
...
@@ -47,17 +47,17 @@ class CacheClass(BaseCache):
if
value
is
None
:
return
default
else
:
# picke doesn't want a unicode!
value
=
smart_str
(
value
)
# hydrate that pickle
value
=
pickle
.
loads
(
value
.
decode
(
'base64'
))
# picke doesn't want a unicode!
value
=
smart_str
(
value
)
# hydrate that pickle
value
=
pickle
.
loads
(
value
.
decode
(
'base64'
))
if
isinstance
(
value
,
basestring
):
return
smart_unicode
(
value
)
else
:
return
value
if
isinstance
(
value
,
basestring
):
return
smart_unicode
(
value
)
else
:
return
value
def
set
(
self
,
key
,
value
,
timeout
=
None
):
"Persist a value to the cache, and set an optional expiration time."
...
...
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