Commit d722d36f authored by Yoshinori Okuji's avatar Yoshinori Okuji

The read-only cache in resolveCategory was not always effective, because the...

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
parent 2f38905d
......@@ -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
......
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