Commit ae7bd172 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

erp5_web: simple yet effective caching policy rules

parent e0bb4bde
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
<key> <string>_policy_ids</string> </key> <key> <string>_policy_ids</string> </key>
<value> <value>
<tuple> <tuple>
<string>unauthenticated web pages no language</string>
<string>unauthenticated web pages</string> <string>unauthenticated web pages</string>
<string>unauthenticated</string>
<string>authenticated</string> <string>authenticated</string>
</tuple> </tuple>
</value> </value>
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_enable_304s</string> </key> <key> <string>_enable_304s</string> </key>
<value> <int>0</int> </value> <value> <int>1</int> </value>
</item> </item>
<item> <item>
<key> <string>_etag_func</string> </key> <key> <string>_etag_func</string> </key>
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
</item> </item>
<item> <item>
<key> <string>_max_age_secs</string> </key> <key> <string>_max_age_secs</string> </key>
<value> <int>0</int> </value> <value> <int>600</int> </value>
</item> </item>
<item> <item>
<key> <string>_mtime_func</string> </key> <key> <string>_mtime_func</string> </key>
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
</item> </item>
<item> <item>
<key> <string>_must_revalidate</string> </key> <key> <string>_must_revalidate</string> </key>
<value> <int>0</int> </value> <value> <int>1</int> </value>
</item> </item>
<item> <item>
<key> <string>_no_cache</string> </key> <key> <string>_no_cache</string> </key>
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
</item> </item>
<item> <item>
<key> <string>_no_store</string> </key> <key> <string>_no_store</string> </key>
<value> <int>1</int> </value> <value> <int>0</int> </value>
</item> </item>
<item> <item>
<key> <string>_no_transform</string> </key> <key> <string>_no_transform</string> </key>
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
</item> </item>
<item> <item>
<key> <string>_private</string> </key> <key> <string>_private</string> </key>
<value> <int>0</int> </value> <value> <int>1</int> </value>
</item> </item>
<item> <item>
<key> <string>_proxy_revalidate</string> </key> <key> <string>_proxy_revalidate</string> </key>
...@@ -125,9 +125,17 @@ ...@@ -125,9 +125,17 @@
<none/> <none/>
</value> </value>
</item> </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> <item>
<key> <string>_vary</string> </key> <key> <string>_vary</string> </key>
<value> <string></string> </value> <value> <string>Accept-Language, Cookie, Authorization, Accept-Encoding</string> </value>
</item> </item>
</dictionary> </dictionary>
</state> </state>
...@@ -135,7 +143,7 @@ ...@@ -135,7 +143,7 @@
</value> </value>
</item> </item>
<item> <item>
<key> <string>unauthenticated</string> </key> <key> <string>unauthenticated web pages</string> </key>
<value> <value>
<object> <object>
<klass> <reference id="2.1"/> </klass> <klass> <reference id="2.1"/> </klass>
...@@ -158,7 +166,7 @@ ...@@ -158,7 +166,7 @@
</item> </item>
<item> <item>
<key> <string>_max_age_secs</string> </key> <key> <string>_max_age_secs</string> </key>
<value> <int>3600</int> </value> <value> <int>600</int> </value>
</item> </item>
<item> <item>
<key> <string>_mtime_func</string> </key> <key> <string>_mtime_func</string> </key>
...@@ -184,7 +192,7 @@ ...@@ -184,7 +192,7 @@
</item> </item>
<item> <item>
<key> <string>_policy_id</string> </key> <key> <string>_policy_id</string> </key>
<value> <string>unauthenticated</string> </value> <value> <string>unauthenticated web pages</string> </value>
</item> </item>
<item> <item>
<key> <string>_post_check</string> </key> <key> <string>_post_check</string> </key>
...@@ -222,9 +230,17 @@ ...@@ -222,9 +230,17 @@
<none/> <none/>
</value> </value>
</item> </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> <item>
<key> <string>_vary</string> </key> <key> <string>_vary</string> </key>
<value> <string>Accept-Language, Cookie</string> </value> <value> <string>Accept-Language, Cookie, Authorization, Accept-Encoding</string> </value>
</item> </item>
</dictionary> </dictionary>
</state> </state>
...@@ -232,7 +248,7 @@ ...@@ -232,7 +248,7 @@
</value> </value>
</item> </item>
<item> <item>
<key> <string>unauthenticated web pages</string> </key> <key> <string>unauthenticated web pages no language</string> </key>
<value> <value>
<object> <object>
<klass> <reference id="2.1"/> </klass> <klass> <reference id="2.1"/> </klass>
...@@ -281,7 +297,7 @@ ...@@ -281,7 +297,7 @@
</item> </item>
<item> <item>
<key> <string>_policy_id</string> </key> <key> <string>_policy_id</string> </key>
<value> <string>unauthenticated web pages</string> </value> <value> <string>unauthenticated web pages no language</string> </value>
</item> </item>
<item> <item>
<key> <string>_post_check</string> </key> <key> <string>_post_check</string> </key>
...@@ -325,11 +341,11 @@ ...@@ -325,11 +341,11 @@
</item> </item>
<item> <item>
<key> <string>_stale_while_revalidate_secs</string> </key> <key> <string>_stale_while_revalidate_secs</string> </key>
<value> <int>0</int> </value> <value> <int>360000</int> </value>
</item> </item>
<item> <item>
<key> <string>_vary</string> </key> <key> <string>_vary</string> </key>
<value> <string>Accept-Language, Cookie</string> </value> <value> <string>Cookie, Authorization, Accept-Encoding</string> </value>
</item> </item>
</dictionary> </dictionary>
</state> </state>
...@@ -402,7 +418,7 @@ ...@@ -402,7 +418,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>
...@@ -454,7 +470,7 @@ ...@@ -454,7 +470,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>python: member is None and object.getPortalType() in ("Web Page", "Web Section", "Web Site")</string> </value> <value> <string>python: member is None and object.getWebSiteValue() is not None and ( len(object.getWebSiteValue().getAvailableLanguageSet()) == 1 or object.getWebSiteValue().getStaticLanguageSelection() )</string> </value>
</item> </item>
</dictionary> </dictionary>
</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