Commit eea71780 authored by Xiaowu Zhang's avatar Xiaowu Zhang Committed by wenjie.zheng

erp5_web: add hateoas caching policy

parent 8cefa6a3
......@@ -788,10 +788,6 @@ def calculateHateoas(is_portal=None, is_site_root=None, traversed_document=None,
if is_site_root:\n
\n
result_dict[\'default_view\'] = \'view\'\n
# XXX Hardcoded cache for 30 minutes. Should only bother developers but speed up Jio access\n
response.setHeader("Cache-Control", "public, max-age=1800")\n
response.setHeader("Vary", "Cookie")\n
response.setHeader("Last-Modified", DateTime().rfc822())\n
REQUEST.set("X-HATEOAS-CACHE", 1)\n
\n
# Global action users for the jIO plugin\n
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Category" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_folders_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Copy_or_Move_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Delete_objects_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>caching_policy/hateoas</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>hateoas</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Hateoas</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -233,6 +233,7 @@
<value>
<tuple>
<string>aggregate/web_page_module/rjs_gadget_erp5_html</string>
<string>caching_policy/hateoas</string>
</tuple>
</value>
</item>
......@@ -483,7 +484,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>941.35235.58430.32802</string> </value>
<value> <string>944.53459.40487.3686</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -501,8 +502,8 @@
</tuple>
<state>
<tuple>
<float>1425895920.4</float>
<string>GMT</string>
<float>1439219895.9</float>
<string>UTC</string>
</tuple>
</state>
</object>
......
......@@ -147,6 +147,14 @@
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>caching_policy/hateoas</string>
</tuple>
</value>
</item>
<item>
<key> <string>container_layout</string> </key>
<value> <string>ERP5Document_getHateoas</string> </value>
......
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