Allura/allura/lib/decorators.py
def memoize(func, *args):
    """
    Cache the method's result, for the given args
    """
    dic = getattr_(func, "memoize_dic", dict)
    # memoize_dic is created at the first call
    if args in dic:
        return dic[args]
    else:
        result = func(*args)
        dic[args] = result
        return result

    Cache the method's result, for the given args
    
Cache the method's result, for the given args
Cache the method ' s result for the given args
def memoize(func, *args):
    dic = getattr_(func, "memoize_dic", dict)
    if args in dic:
        return dic[args]
    else:
        result = func(*args)
        dic[args] = result
        return result
def memoize ( func , * args ) : dic = getattr_ ( func , "memoize_dic" , dict ) if args in dic : return dic [ args ] else : result = func ( * args ) dic [ args ] = result return result
Cache the method's result, for the given args
Cache the method ' s result for the given args
"""
    Cache the method's result, for the given args
    """ # memoize_dic is created at the first call
func