Commit fffd0787 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Optimize generateCacheId.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15574 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 77668397
......@@ -217,10 +217,11 @@ class CachingMethod:
cache_id = [method_id]
key_list = kwd.keys()
key_list.sort()
append = cache_id.append
for arg in args:
cache_id.append((None, arg))
append((None, arg))
for key in key_list:
cache_id.append((key, str(kwd[key])))
append((key, kwd[key]))
cache_id = str(cache_id)
# because some cache backends don't allow some chars in cached id we make
# sure to replace them
......
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