fmn.cache.util module

fmn.cache.util.cache_arg(arg: str, scope: str | None = None) Callable[[str, str | None], Any][source]

Generate a cached function for cashews decorator arguments.

The purpose of this is to evaluate the settings late (i.e. the first time a decorated callable is called), so customized settings can be applied effectively.

fmn.cache.util.cache_ttl(scope: str | None = None) Callable[[str, str | None], Any]

Generate a cached function for cashews decorator arguments.

The purpose of this is to evaluate the settings late (i.e. the first time a decorated callable is called), so customized settings can be applied effectively.

fmn.cache.util.configure_cache(**kwargs)[source]
fmn.cache.util.get_pattern_for_cached_calls(func: Callable, **kwargs: dict[str, Any]) list[str][source]
fmn.cache.util.lock_ttl(scope: str | None = None) Callable[[str, str | None], Any]

Generate a cached function for cashews decorator arguments.

The purpose of this is to evaluate the settings late (i.e. the first time a decorated callable is called), so customized settings can be applied effectively.