Commit 1ec2d4c2 authored by Jean-Paul Smets's avatar Jean-Paul Smets

Do not purge cache whenever we change language. We should use a per language...

Do not purge cache whenever we change language. We should use a per language key in cache if needed.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12408 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 24f5d2d2
...@@ -71,10 +71,6 @@ ...@@ -71,10 +71,6 @@
<value> <string># XXX Localizer-dependent\n <value> <string># XXX Localizer-dependent\n
portal = context.getPortalObject()\n portal = context.getPortalObject()\n
portal.Localizer.changeLanguage(select_language)\n portal.Localizer.changeLanguage(select_language)\n
\n
# XXX should invalidate cached data specific to current user\n
from Products.ERP5Type.Cache import clearCache\n
clearCache()\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -127,8 +123,6 @@ clearCache()\n ...@@ -127,8 +123,6 @@ clearCache()\n
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>portal</string> <string>portal</string>
<string>Products.ERP5Type.Cache</string>
<string>clearCache</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -70,7 +70,11 @@ ...@@ -70,7 +70,11 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>from Products.ERP5Type.Cache import CachingMethod\n <value> <string>from Products.ERP5Type.Cache import CachingMethod\n
navigation_box_render = context.navigation_box_render\n navigation_box_render = context.navigation_box_render\n
navigation_box_render = CachingMethod(navigation_box_render, ("ERP5Site_renderCachedNavigationBox", context.portal_membership.getAuthenticatedMember().getUserName()), cache_duration=300)\n navigation_box_render = CachingMethod(navigation_box_render,\n
("ERP5Site_renderCachedNavigationBox",\n
context.portal_membership.getAuthenticatedMember().getUserName(),\n
context.Localizer.get_selected_language()\n
),cache_duration=300)\n
return navigation_box_render()\n return navigation_box_render()\n
</string> </value> </string> </value>
</item> </item>
......
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