Add caching back in (#312)

* Add caching back in

Works now against filter instead of dataframe view

* Layout cache and move post->put

* Fix tests
This commit is contained in:
Charlotte Weaver
2018-10-11 16:29:46 -07:00
parent b90292ce4c
commit 3229babd14
4 changed files with 47 additions and 27 deletions
+5 -10
View File
@@ -670,17 +670,12 @@ class LayoutObsAPI(Resource):
},
}
})
def post(self):
def put(self):
try:
return make_response(
jsonify({
"layout": current_app.data.layout(
request.get_json()["filter"],
interactive_limit=current_app.data.features["layout"]["obs"]["interactiveLimit"]
)
}),
HTTPStatus.OK
)
filter = request.get_json()["filter"]
interactive_limit = current_app.data.features["layout"]["obs"]["interactiveLimit"]
layout = current_app.data.layout(filter, interactive_limit=interactive_limit)
return make_response(jsonify({"layout": layout}), HTTPStatus.OK)
except FilterError as e:
return make_response(e.message, HTTPStatus.BAD_REQUEST)
except InteractiveError: