erp5_hal_json_style/erp5_web: fix http cache condition
The main query to the hateoas web section must be cache by the browser, to reduce the number of queries by 2. Caching policy manager conditions are checked before calculating the query result, and so, it is not possible anymore to wait for the script to explicitely ask for the result to be cached.
Showing
... | ... | @@ -1506,7 +1506,7 @@ |
<dictionary> | ||
<item> | ||
<key> <string>text</string> </key> | ||
<value> <string>python: member is not None and (lambda x: x is not None and x.getCachingPolicy() =="hateoas")(object.getWebSectionValue()) and request.get("X-HATEOAS-CACHE")</string> </value> | ||
<value> <string>python: (member is not None) and (request.other[\'method\'] == "GET") and (request.environ[\'QUERY_STRING\'] == "") and (lambda x: (x is not None) and (request.other[\'PUBLISHED\'] == x) and (x.getCachingPolicy() == "hateoas"))(object.getWebSectionValue())</string> </value> | ||
|
||
</item> | ||
</dictionary> | ||
</pickle> | ||
... | ... |
-
mentioned in commit romain/erp5@7bb68c2a
-
mentioned in commit romain/erp5@bec622a2
-
mentioned in commit romain/erp5@c4876087