From 0b0496c07d402ff45a98b04a5ec515011f02258c Mon Sep 17 00:00:00 2001
From: Fabien Morin <fabien@nexedi.com>
Date: Fri, 5 Mar 2010 14:37:52 +0000
Subject: [PATCH] fix a major cache problem : All RAM Cache Manager object from
 erp5_web had the same id than user_ram_cache from erp5_xhtml_style. So the
 cache used was always the same for this five caches. After investigation this
 problem come from the fact that this cache object have been cloned each
 others and it appears that a zope bug didn't change the cache id in this
 cases. We are working to solve the zope bug to not have this behaviour
 anymore on next clonned caches, but for now, this commit fix existing ones.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33449 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 bt5/erp5_web/PathTemplateItem/web_section_ram_cache.xml      | 4 ++--
 bt5/erp5_web/PathTemplateItem/web_section_user_ram_cache.xml | 4 ++--
 bt5/erp5_web/PathTemplateItem/web_site_ram_cache.xml         | 4 ++--
 bt5/erp5_web/PathTemplateItem/web_site_user_ram_cache.xml    | 4 ++--
 bt5/erp5_web/bt/change_log                                   | 3 +++
 bt5/erp5_web/bt/revision                                     | 2 +-
 6 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/bt5/erp5_web/PathTemplateItem/web_section_ram_cache.xml b/bt5/erp5_web/PathTemplateItem/web_section_ram_cache.xml
index a2b6da6a17..16a6d083a6 100644
--- a/bt5/erp5_web/PathTemplateItem/web_section_ram_cache.xml
+++ b/bt5/erp5_web/PathTemplateItem/web_section_ram_cache.xml
@@ -11,7 +11,7 @@
       <dictionary>
         <item>
             <key> <string>_RAMCacheManager__cacheid</string> </key>
-            <value> <string>140571995811424_1232605080.630355</string> </value>
+            <value> <string>140072430325584_1267799344.968250</string> </value>
         </item>
         <item>
             <key> <string>_settings</string> </key>
@@ -29,8 +29,8 @@
                     <key> <string>request_vars</string> </key>
                     <value>
                       <tuple>
+                        <string>LOCALIZER_LANGUAGE</string>
                         <string>current_web_section_url</string>
-                        <string>web_site_language</string>
                       </tuple>
                     </value>
                 </item>
diff --git a/bt5/erp5_web/PathTemplateItem/web_section_user_ram_cache.xml b/bt5/erp5_web/PathTemplateItem/web_section_user_ram_cache.xml
index 7d245e5459..8c761c8059 100644
--- a/bt5/erp5_web/PathTemplateItem/web_section_user_ram_cache.xml
+++ b/bt5/erp5_web/PathTemplateItem/web_section_user_ram_cache.xml
@@ -11,7 +11,7 @@
       <dictionary>
         <item>
             <key> <string>_RAMCacheManager__cacheid</string> </key>
-            <value> <string>140571995811424_1232605080.630355</string> </value>
+            <value> <string>140072436180344_1267799283.709483</string> </value>
         </item>
         <item>
             <key> <string>_settings</string> </key>
@@ -30,8 +30,8 @@
                     <value>
                       <tuple>
                         <string>AUTHENTICATED_USER</string>
+                        <string>LOCALIZER_LANGUAGE</string>
                         <string>current_web_section_url</string>
-                        <string>web_site_language</string>
                       </tuple>
                     </value>
                 </item>
diff --git a/bt5/erp5_web/PathTemplateItem/web_site_ram_cache.xml b/bt5/erp5_web/PathTemplateItem/web_site_ram_cache.xml
index 2b42659174..2fa511bf4b 100644
--- a/bt5/erp5_web/PathTemplateItem/web_site_ram_cache.xml
+++ b/bt5/erp5_web/PathTemplateItem/web_site_ram_cache.xml
@@ -11,7 +11,7 @@
       <dictionary>
         <item>
             <key> <string>_RAMCacheManager__cacheid</string> </key>
-            <value> <string>140571995811424_1232605080.630355</string> </value>
+            <value> <string>140072430325224_1267799245.877288</string> </value>
         </item>
         <item>
             <key> <string>_settings</string> </key>
@@ -29,8 +29,8 @@
                     <key> <string>request_vars</string> </key>
                     <value>
                       <tuple>
+                        <string>LOCALIZER_LANGUAGE</string>
                         <string>current_web_site_url</string>
-                        <string>web_site_language</string>
                       </tuple>
                     </value>
                 </item>
diff --git a/bt5/erp5_web/PathTemplateItem/web_site_user_ram_cache.xml b/bt5/erp5_web/PathTemplateItem/web_site_user_ram_cache.xml
index 8b22f36635..8fe9e52919 100644
--- a/bt5/erp5_web/PathTemplateItem/web_site_user_ram_cache.xml
+++ b/bt5/erp5_web/PathTemplateItem/web_site_user_ram_cache.xml
@@ -11,7 +11,7 @@
       <dictionary>
         <item>
             <key> <string>_RAMCacheManager__cacheid</string> </key>
-            <value> <string>140571995811424_1232605080.630355</string> </value>
+            <value> <string>140072436181544_1267799200.241044</string> </value>
         </item>
         <item>
             <key> <string>_settings</string> </key>
@@ -30,8 +30,8 @@
                     <value>
                       <tuple>
                         <string>AUTHENTICATED_USER</string>
+                        <string>LOCALIZER_LANGUAGE</string>
                         <string>current_web_site_url</string>
-                        <string>web_site_language</string>
                       </tuple>
                     </value>
                 </item>
diff --git a/bt5/erp5_web/bt/change_log b/bt5/erp5_web/bt/change_log
index eecdd5b5f0..fdb16933b8 100644
--- a/bt5/erp5_web/bt/change_log
+++ b/bt5/erp5_web/bt/change_log
@@ -1,3 +1,6 @@
+2010-03-05 fabien
+* fix caches id bug. Now caches should works much better.
+
 2010-02-02 fabien
 * remove WebSection_getPermanentURLForView which was bad (see bug #1507) and use getPermanentUrl() from WebSection.py.
 * WebSection_getPermanentUrl script is not used anymore (and should never be used, it should be called only by getPermanentUrl() from WebSection.py). Now by default, getPermanentUrl(document) always return a link to html content. If you want to get a link to a file (ie. openoffice document, pdf document, ...) you should explicitly specify it :
diff --git a/bt5/erp5_web/bt/revision b/bt5/erp5_web/bt/revision
index a13b1ebe37..93039b45e9 100644
--- a/bt5/erp5_web/bt/revision
+++ b/bt5/erp5_web/bt/revision
@@ -1 +1 @@
-913
\ No newline at end of file
+915
\ No newline at end of file
-- 
2.30.9