Commit 02097577 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

cache: make public DMS conversion result cacheable even for authenticated users.

also :
* remove Accept-Encoding from Vary header, because Zope's response does not differ by Accept-Encoding request header.
* use getModificationDate() for modification time if available.
parent 514a5157
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string># This script has \'Anonymous\' proxy role to check \'View\' permission for Anonymous.\n
return \'format\' in context.REQUEST and context.getPortalObject().portal_membership.checkPermission(\'View\', context)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Anonymous</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_isPublicConvertionResult</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -18,6 +18,8 @@
<tuple>
<string>no-cache</string>
<string>one-day-max-modification-date</string>
<string>public-conversion-result-no-language</string>
<string>public-conversion-result</string>
<string>unauthenticated no language</string>
<string>unauthenticated</string>
<string>authenticated</string>
......@@ -347,7 +349,7 @@
</item>
<item>
<key> <string>_vary</string> </key>
<value> <string>Cookie, Authorization, Accept-Encoding</string> </value>
<value> <string>Cookie, Authorization</string> </value>
</item>
</dictionary>
</state>
......@@ -355,7 +357,7 @@
</value>
</item>
<item>
<key> <string>unauthenticated</string> </key>
<key> <string>public-conversion-result</string> </key>
<value>
<object>
<klass> <reference id="2.1"/> </klass>
......@@ -404,7 +406,7 @@
</item>
<item>
<key> <string>_policy_id</string> </key>
<value> <string>unauthenticated</string> </value>
<value> <string>public-conversion-result</string> </value>
</item>
<item>
<key> <string>_post_check</string> </key>
......@@ -452,7 +454,7 @@
</item>
<item>
<key> <string>_vary</string> </key>
<value> <string>Accept-Language, Cookie, Authorization, Accept-Encoding</string> </value>
<value> <string>Accept-Language, Cookie</string> </value>
</item>
</dictionary>
</state>
......@@ -460,7 +462,7 @@
</value>
</item>
<item>
<key> <string>unauthenticated no language</string> </key>
<key> <string>public-conversion-result-no-language</string> </key>
<value>
<object>
<klass> <reference id="2.1"/> </klass>
......@@ -509,7 +511,7 @@
</item>
<item>
<key> <string>_policy_id</string> </key>
<value> <string>unauthenticated no language</string> </value>
<value> <string>public-conversion-result-no-language</string> </value>
</item>
<item>
<key> <string>_post_check</string> </key>
......@@ -557,7 +559,217 @@
</item>
<item>
<key> <string>_vary</string> </key>
<value> <string>Cookie, Authorization, Accept-Encoding</string> </value>
<value> <string></string> </value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>unauthenticated</string> </key>
<value>
<object>
<klass> <reference id="2.1"/> </klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_enable_304s</string> </key>
<value> <int>1</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>1</int> </value>
</item>
<item>
<key> <string>_max_age_secs</string> </key>
<value> <int>600</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>0</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>unauthenticated</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>1</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>360000</int> </value>
</item>
<item>
<key> <string>_vary</string> </key>
<value> <string>Accept-Language, Cookie, Authorization</string> </value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>unauthenticated no language</string> </key>
<value>
<object>
<klass> <reference id="2.1"/> </klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_enable_304s</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>_etag_func</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAABU=</string> </persistent>
</value>
</item>
<item>
<key> <string>_last_modified</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>_max_age_secs</string> </key>
<value> <int>600</int> </value>
</item>
<item>
<key> <string>_mtime_func</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAABY=</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>0</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>unauthenticated no language</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">AAAAAAAAABc=</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>1</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>360000</int> </value>
</item>
<item>
<key> <string>_vary</string> </key>
<value> <string>Cookie, Authorization</string> </value>
</item>
</dictionary>
</state>
......@@ -708,7 +920,7 @@
<dictionary>
<item>
<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>
</dictionary>
</pickle>
......@@ -721,7 +933,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: member is None</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>
</dictionary>
</pickle>
......@@ -747,7 +959,7 @@
<dictionary>
<item>
<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>
</dictionary>
</pickle>
......@@ -760,7 +972,85 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: member is None and object.getWebSiteValue() is not None and ( len(object.getWebSiteValue().getAvailableLanguageSet()) == 1 or object.getWebSiteValue().getStaticLanguageSelection() )</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>
</dictionary>
</pickle>
</record>
<record id="18" aka="AAAAAAAAABI=">
<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="19" aka="AAAAAAAAABM=">
<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="20" aka="AAAAAAAAABQ=">
<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="21" aka="AAAAAAAAABU=">
<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="22" aka="AAAAAAAAABY=">
<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="23" aka="AAAAAAAAABc=">
<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 (len(x.getAvailableLanguageSet()) == 1 or x.getStaticLanguageSelection()))(object.getWebSectionValue())</string> </value>
</item>
</dictionary>
</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