forked from orbit-oss/flask
Remove redundant cache flag
This commit is contained in:
parent
c9ef500c5c
commit
23de58682c
2 changed files with 11 additions and 3 deletions
|
|
@ -353,3 +353,11 @@ independently of the session backend used::
|
|||
Note that in this case you have to use the ``sess`` object instead of the
|
||||
:data:`flask.session` proxy. The object however itself will provide the
|
||||
same interface.
|
||||
|
||||
|
||||
Testing JSON APIs
|
||||
-----------------
|
||||
|
||||
.. versionadded:: 1.0
|
||||
|
||||
Flask has comprehensive
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ from .globals import _request_ctx_stack
|
|||
_missing = object()
|
||||
|
||||
|
||||
def _get_data(req, cache):
|
||||
def _get_data(req):
|
||||
getter = getattr(req, 'get_data', None)
|
||||
if getter is not None:
|
||||
return getter(cache=cache)
|
||||
return getter()
|
||||
return req.data
|
||||
|
||||
|
||||
|
|
@ -84,7 +84,7 @@ class JSONMixin(object):
|
|||
# been encoded correctly as well.
|
||||
charset = self.mimetype_params.get('charset')
|
||||
try:
|
||||
data = _get_data(self, cache)
|
||||
data = _get_data(self)
|
||||
if charset is not None:
|
||||
rv = json.loads(data, encoding=charset)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue