Time based decorator, implementing :class:`faste.caches.TimeoutCache`

    :param int timeout: Cache key timeout

    :param int max_size: (keyword) max size.

def timed_cache(timeout, max_size=128):
    """
    Time based decorator, implementing :class:`faste.caches.TimeoutCache`

    :param int timeout: Cache key timeout

    :param int max_size: (keyword) max size.
    """

    def actual_decorator(func):
        return _cached_func(func, caches.TimeoutCache, timeout, max_size=max_size)

    return actual_decorator