human
I wrote the below code

    def _temp(key_func):
        dct = {}
        _time_caches[time_add_setting] = dct
        def wrapper(*args, **kwargs):
            generator = key_func(*args, **kwargs)
            key = next(generator)
            try:
                (expiry, value) = dct[key]
                if (expiry > time.time()):
                    return value
            except KeyError:
                pass
            value = next(generator)
            time_add = getattr(settings, time_add_setting)
            if (key is not None):
                dct[key] = ((time.time() + time_add), value)
            return value
        return wrapper
    return _temp

What's a good function header?
 ... Here's a good function header?
assistant
#Here's a good function header.

def time_cache(time_add_setting):