Commit fb869e0a authored by Rafael Monnerat's avatar Rafael Monnerat

erp5_web: Introduce no-store policy

  We must ensure that some Web Section (under a website with must-revalidate caching policy) can have a session that isn't stored.

  Different from no-cache (that is similar to must-revalidate + max-age=0), no-store tells the client (and frontends) that it must not cache the content ever.
parent 1ae11adc
<?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/no-cache</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>no-store</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>No Store</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
<key> <string>_policy_ids</string> </key> <key> <string>_policy_ids</string> </key>
<value> <value>
<tuple> <tuple>
<string>no-store</string>
<string>no-cache</string> <string>no-cache</string>
<string>one-year-cache</string> <string>one-year-cache</string>
<string>one-day-max-modification-date</string> <string>one-day-max-modification-date</string>
...@@ -586,6 +587,111 @@ ...@@ -586,6 +587,111 @@
</object> </object>
</value> </value>
</item> </item>
<item>
<key> <string>no-store</string> </key>
<value>
<object>
<klass> <reference id="2.1"/> </klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_enable_304s</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>_etag_func</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAABI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_last_modified</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>_max_age_secs</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>_mtime_func</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAABM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_must_revalidate</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>_no_cache</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>_no_store</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>_no_transform</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>_policy_id</string> </key>
<value> <string>no-store</string> </value>
</item>
<item>
<key> <string>_post_check</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_pre_check</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_predicate</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAABQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>_private</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>_proxy_revalidate</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>_public</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>_s_max_age_secs</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_stale_if_error_secs</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>_stale_while_revalidate_secs</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>_vary</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item> <item>
<key> <string>one-day-max-modification-date</string> </key> <key> <string>one-day-max-modification-date</string> </key>
<value> <value>
...@@ -601,7 +707,7 @@ ...@@ -601,7 +707,7 @@
<item> <item>
<key> <string>_etag_func</string> </key> <key> <string>_etag_func</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAABI=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAABU=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
...@@ -615,7 +721,7 @@ ...@@ -615,7 +721,7 @@
<item> <item>
<key> <string>_mtime_func</string> </key> <key> <string>_mtime_func</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAABM=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAABY=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
...@@ -653,7 +759,7 @@ ...@@ -653,7 +759,7 @@
<item> <item>
<key> <string>_predicate</string> </key> <key> <string>_predicate</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAABQ=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAABc=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
...@@ -706,7 +812,7 @@ ...@@ -706,7 +812,7 @@
<item> <item>
<key> <string>_etag_func</string> </key> <key> <string>_etag_func</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAABU=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAABg=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
...@@ -720,7 +826,7 @@ ...@@ -720,7 +826,7 @@
<item> <item>
<key> <string>_mtime_func</string> </key> <key> <string>_mtime_func</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAABY=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAABk=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
...@@ -758,7 +864,7 @@ ...@@ -758,7 +864,7 @@
<item> <item>
<key> <string>_predicate</string> </key> <key> <string>_predicate</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAABc=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAABo=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
...@@ -811,7 +917,7 @@ ...@@ -811,7 +917,7 @@
<item> <item>
<key> <string>_etag_func</string> </key> <key> <string>_etag_func</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAABg=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAABs=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
...@@ -825,7 +931,7 @@ ...@@ -825,7 +931,7 @@
<item> <item>
<key> <string>_mtime_func</string> </key> <key> <string>_mtime_func</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAABk=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAABw=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
...@@ -863,7 +969,7 @@ ...@@ -863,7 +969,7 @@
<item> <item>
<key> <string>_predicate</string> </key> <key> <string>_predicate</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAABo=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAB0=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
...@@ -916,7 +1022,7 @@ ...@@ -916,7 +1022,7 @@
<item> <item>
<key> <string>_etag_func</string> </key> <key> <string>_etag_func</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAABs=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAB4=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
...@@ -930,7 +1036,7 @@ ...@@ -930,7 +1036,7 @@
<item> <item>
<key> <string>_mtime_func</string> </key> <key> <string>_mtime_func</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAABw=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAB8=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
...@@ -968,7 +1074,7 @@ ...@@ -968,7 +1074,7 @@
<item> <item>
<key> <string>_predicate</string> </key> <key> <string>_predicate</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAB0=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAACA=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
...@@ -1021,7 +1127,7 @@ ...@@ -1021,7 +1127,7 @@
<item> <item>
<key> <string>_etag_func</string> </key> <key> <string>_etag_func</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAB4=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAACE=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
...@@ -1035,7 +1141,7 @@ ...@@ -1035,7 +1141,7 @@
<item> <item>
<key> <string>_mtime_func</string> </key> <key> <string>_mtime_func</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAB8=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAACI=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
...@@ -1073,7 +1179,7 @@ ...@@ -1073,7 +1179,7 @@
<item> <item>
<key> <string>_predicate</string> </key> <key> <string>_predicate</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAACA=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAACM=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
...@@ -1126,7 +1232,7 @@ ...@@ -1126,7 +1232,7 @@
<item> <item>
<key> <string>_etag_func</string> </key> <key> <string>_etag_func</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAACE=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAACQ=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
...@@ -1140,7 +1246,7 @@ ...@@ -1140,7 +1246,7 @@
<item> <item>
<key> <string>_mtime_func</string> </key> <key> <string>_mtime_func</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAACI=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAACU=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
...@@ -1178,7 +1284,7 @@ ...@@ -1178,7 +1284,7 @@
<item> <item>
<key> <string>_predicate</string> </key> <key> <string>_predicate</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAACM=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAACY=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
...@@ -1231,7 +1337,7 @@ ...@@ -1231,7 +1337,7 @@
<item> <item>
<key> <string>_etag_func</string> </key> <key> <string>_etag_func</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAACQ=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAACc=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
...@@ -1245,7 +1351,7 @@ ...@@ -1245,7 +1351,7 @@
<item> <item>
<key> <string>_mtime_func</string> </key> <key> <string>_mtime_func</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAACU=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAACg=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
...@@ -1283,7 +1389,7 @@ ...@@ -1283,7 +1389,7 @@
<item> <item>
<key> <string>_predicate</string> </key> <key> <string>_predicate</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAACY=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAACk=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
...@@ -1517,7 +1623,7 @@ ...@@ -1517,7 +1623,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>python: member is None and (lambda x: x is not None and x.getCachingPolicy() == \'no-cache\')(object.getWebSectionValue())</string> </value> <value> <string>python: (lambda x: x is not None and x.getCachingPolicy() == \'no-cache\')(object.getWebSectionValue())</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
...@@ -1543,7 +1649,7 @@ ...@@ -1543,7 +1649,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>python: max(getattr(object, \'Base_getWebDocumentDrivenModificationDate\', object.modified)(), DateTime().earliestTime())</string> </value> <value> <string>object/modified</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
...@@ -1556,7 +1662,7 @@ ...@@ -1556,7 +1662,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>python: member is None and (lambda x: x is not None and x.getCachingPolicy() == \'one-day-max-modification-date\')(object.getWebSectionValue())</string> </value> <value> <string>python: (lambda x: x is not None and x.getCachingPolicy() == \'no-store\')(object.getWebSectionValue())</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
...@@ -1582,7 +1688,7 @@ ...@@ -1582,7 +1688,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>python: max(getattr(object, \'Base_getWebDocumentDrivenModificationDate\', object.modified)(), DateTime().earliestTime() + (DateTime().hour() /24.0))</string> </value> <value> <string>python: max(getattr(object, \'Base_getWebDocumentDrivenModificationDate\', object.modified)(), DateTime().earliestTime())</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
...@@ -1595,7 +1701,7 @@ ...@@ -1595,7 +1701,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>python: member is None and (lambda x: x is not None and x.getCachingPolicy() == \'one-hour-max-modification-date\')(object.getWebSectionValue())</string> </value> <value> <string>python: member is None and (lambda x: x is not None and x.getCachingPolicy() == \'one-day-max-modification-date\')(object.getWebSectionValue())</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
...@@ -1621,7 +1727,7 @@ ...@@ -1621,7 +1727,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>python: getattr(object, \'Base_getWebDocumentDrivenModificationDate\', object.modified)()</string> </value> <value> <string>python: max(getattr(object, \'Base_getWebDocumentDrivenModificationDate\', object.modified)(), DateTime().earliestTime() + (DateTime().hour() /24.0))</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
...@@ -1634,7 +1740,7 @@ ...@@ -1634,7 +1740,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>python: member is None and (lambda x: x is not None and x.getCachingPolicy() == \'one-year-cache\')(object.getWebSectionValue())</string> </value> <value> <string>python: member is None and (lambda x: x is not None and x.getCachingPolicy() == \'one-hour-max-modification-date\')(object.getWebSectionValue())</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
...@@ -1660,7 +1766,7 @@ ...@@ -1660,7 +1766,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>python: getattr(object, \'getModificationDate\', object.modified)()</string> </value> <value> <string>python: getattr(object, \'Base_getWebDocumentDrivenModificationDate\', object.modified)()</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
...@@ -1673,7 +1779,7 @@ ...@@ -1673,7 +1779,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>python: object.Base_isPublicConvertionResult() and (lambda x: x is not None and not (len(x.getAvailableLanguageSet()) == 1 or x.getStaticLanguageSelection()))(object.getWebSectionValue())</string> </value> <value> <string>python: member is None and (lambda x: x is not None and x.getCachingPolicy() == \'one-year-cache\')(object.getWebSectionValue())</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
...@@ -1712,7 +1818,7 @@ ...@@ -1712,7 +1818,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>python: object.Base_isPublicConvertionResult() and (lambda x: x is not None and (len(x.getAvailableLanguageSet()) == 1 or x.getStaticLanguageSelection()))(object.getWebSectionValue())</string> </value> <value> <string>python: object.Base_isPublicConvertionResult() and (lambda x: x is not None and not (len(x.getAvailableLanguageSet()) == 1 or x.getStaticLanguageSelection()))(object.getWebSectionValue())</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
...@@ -1738,7 +1844,7 @@ ...@@ -1738,7 +1844,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>python: getattr(object, \'Base_getWebDocumentDrivenModificationDate\', object.modified)()</string> </value> <value> <string>python: getattr(object, \'getModificationDate\', object.modified)()</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
...@@ -1751,7 +1857,7 @@ ...@@ -1751,7 +1857,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>python: member is None and (lambda x: x is not None and not (len(x.getAvailableLanguageSet()) == 1 or x.getStaticLanguageSelection()))(object.getWebSectionValue())</string> </value> <value> <string>python: object.Base_isPublicConvertionResult() and (lambda x: x is not None and (len(x.getAvailableLanguageSet()) == 1 or x.getStaticLanguageSelection()))(object.getWebSectionValue())</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
...@@ -1783,6 +1889,45 @@ ...@@ -1783,6 +1889,45 @@
</pickle> </pickle>
</record> </record>
<record id="38" aka="AAAAAAAAACY="> <record id="38" aka="AAAAAAAAACY=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: member is None and (lambda x: x is not None and not (len(x.getAvailableLanguageSet()) == 1 or x.getStaticLanguageSelection()))(object.getWebSectionValue())</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="39" aka="AAAAAAAAACc=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="40" aka="AAAAAAAAACg=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: getattr(object, \'Base_getWebDocumentDrivenModificationDate\', object.modified)()</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="41" aka="AAAAAAAAACk=">
<pickle> <pickle>
<global name="Expression" module="Products.CMFCore.Expression"/> <global name="Expression" module="Products.CMFCore.Expression"/>
</pickle> </pickle>
......
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