Commit ab3ae636 authored by Romain Courteaud's avatar Romain Courteaud

[erp5_hal_json_style] Cache the form definition query

parent a6921fd4
...@@ -884,6 +884,9 @@ def calculateHateoas(is_portal=None, is_site_root=None, traversed_document=None, ...@@ -884,6 +884,9 @@ def calculateHateoas(is_portal=None, is_site_root=None, traversed_document=None,
traversed_document_portal_type = traversed_document.getPortalType()\n traversed_document_portal_type = traversed_document.getPortalType()\n
if traversed_document_portal_type == "ERP5 Form":\n if traversed_document_portal_type == "ERP5 Form":\n
renderFormDefinition(traversed_document, result_dict)\n renderFormDefinition(traversed_document, result_dict)\n
response.setHeader("Cache-Control", "private, max-age=1800")\n
response.setHeader("Vary", "Cookie,Authorization,Accept-Encoding")\n
response.setHeader("Last-Modified", DateTime().rfc822())\n
REQUEST.set("X-HATEOAS-CACHE", 1)\n REQUEST.set("X-HATEOAS-CACHE", 1)\n
elif relative_url == \'portal_workflow\':\n elif relative_url == \'portal_workflow\':\n
result_dict[\'_links\'][\'action_worklist\'] = {\n result_dict[\'_links\'][\'action_worklist\'] = {\n
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment