Rather than using *args you can supply a default positional only argument.
def temporary_cache(fn=None, *, ttl=60):
if fn is not None:
If you feel following "flat is better than nested" is best, we can use functools.partial to remove the need to define decorator.
def temporary_cache(fn=None, *, ...