def cache(self, k=None, expire=None):
        def _f(func):
            def f(*args, **kwargs):
                if not k:
                    r = repr(args) + repr(sorted(kwargs.items()))
                    key = func.__module__ + '.' + func.__name__ + r
                else:
                    key = k
                try:
                    ret = self.get(key)
                    return ret
                except __HOLE__:
                    ret = func(*args, **kwargs)
                    self.set(key, ret, expire=expire)
                    return ret
            
            wrap_func(f, func)
            return f
        return _f
dataset/ETHPy150Open limodou/uliweb/uliweb/lib/weto/cache.py/Cache.cache