Commit b1421420 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

define wrapper method because creating a function object each time is a waste of time.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29749 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6f7d46f7
......@@ -280,4 +280,6 @@ def generateCacheIdWithoutFirstArg(method_id, *args, **kwd):
def caching_class_method_decorator(*args, **kw):
kw.setdefault('cache_id_func', generateCacheIdWithoutFirstArg)
return lambda m: lambda *a, **k: CachingMethod(m, *args, **kw)(*a, **k)
def wrapped(method):
return lambda *a, **k: CachingMethod(method, *args, **kw)(*a, **k)
return wrapped
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