forked from orbit-oss/flask
Ignore cache on request.get_json(cache=False) call (#2089)
* Test cache argument of Request.get_json * Ignore cache on request.get_json(cache=False) call Removes usage of `_cached_json` property when `get_json` is called with disabled cache argument. (closes #2087)
This commit is contained in:
parent
0e79aba40d
commit
36425d5f91
2 changed files with 10 additions and 1 deletions
|
|
@ -137,7 +137,8 @@ class Request(RequestBase):
|
|||
on the request.
|
||||
"""
|
||||
rv = getattr(self, '_cached_json', _missing)
|
||||
if rv is not _missing:
|
||||
# We return cached JSON only when the cache is enabled.
|
||||
if cache and rv is not _missing:
|
||||
return rv
|
||||
|
||||
if not (force or self.is_json):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue