nvitop.caching module

ttl_cache(-> Callable[[Callable[_P, _T]], ...)

Time aware cache decorator.

nvitop.ttl_cache(maxsize: int | None = 128, *, ttl: float = 600.0, timer: Callable[[], float] = time.monotonic, typed: bool = False) Callable[[Callable[_P, _T]], Callable[_P, _T]][source]
nvitop.ttl_cache(maxsize: Callable[_P, _T], *, ttl: float = 600.0, timer: Callable[[], float] = time.monotonic, typed: bool = False) Callable[_P, _T]

Time aware cache decorator.