From d722d36feb990eccf46c22d44050f96a2e364757 Mon Sep 17 00:00:00 2001
From: Yoshinori Okuji <yo@nexedi.com>
Date: Tue, 3 Nov 2009 05:17:52 +0000
Subject: [PATCH] The read-only cache in resolveCategory was not always
 effective, because the name "key" was used for other things but a cache key,
 so rename it to cache_key.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30237 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/CMFCategory/CategoryTool.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/product/CMFCategory/CategoryTool.py b/product/CMFCategory/CategoryTool.py
index 65d29647bb..99f0ecd8db 100644
--- a/product/CMFCategory/CategoryTool.py
+++ b/product/CMFCategory/CategoryTool.py
@@ -1591,9 +1591,9 @@ class CategoryTool( UniqueObject, Folder, Base ):
           return relative_url
         cache = getReadOnlyTransactionCache(self)
         if cache is not None:
-          key = ('resolveCategory', relative_url)
+          cache_key = ('resolveCategory', relative_url)
           try:
-            return cache[key]
+            return cache[cache_key]
           except KeyError:
             pass
 
@@ -1714,7 +1714,7 @@ class CategoryTool( UniqueObject, Folder, Base ):
               'Could not access object %s' % relative_url)
 
         if cache is not None:
-          cache[key] = obj
+          cache[cache_key] = obj
 
         return obj
 
-- 
2.30.9