Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
retribute.me
api
Commits
1f2b53b3
Verified
Commit
1f2b53b3
authored
Jun 06, 2019
by
Eliot Berriot
Browse files
Fixed a serialization issue
parent
64850e78
Changes
1
Hide whitespace changes
Inline
Side-by-side
retribute_api/cache.py
View file @
1f2b53b3
...
@@ -49,7 +49,11 @@ class Redis(Backend):
...
@@ -49,7 +49,11 @@ class Redis(Backend):
v
=
await
r
.
get
(
key
)
v
=
await
r
.
get
(
key
)
except
KeyError
:
except
KeyError
:
raise
self
.
NotFound
(
key
)
raise
self
.
NotFound
(
key
)
return
json
.
loads
(
v
)
try
:
return
json
.
loads
(
v
)
except
TypeError
:
# Null, empty string, etc.
return
v
async
def
set
(
self
,
key
,
value
):
async
def
set
(
self
,
key
,
value
):
r
=
await
self
.
redis
()
r
=
await
self
.
redis
()
...
...
Write
Preview
Supports
Markdown
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