Singleton Turn Caching
This module contains functions for caching function results on each dialog turn.
-
USED_CACHES: List[Callable] = []
Cache singleton, it is common for all actors and pipelines in current environment.
-
cache_clear()[source]
Function for cache singleton clearing, it is called in the end of pipeline execution turn.
-
lru_cache(maxsize=None, typed=False)[source]
Decorator function for caching function results in scripts.
Works like the standard lru_cache()
function.
Caches are kept in a library-wide singleton and cleared in the end of each turn.
- Return type:
Callable
-
cache(func)[source]
Decorator function for caching function results in scripts.
Works like the standard cache()
function.
Caches are kept in a library-wide singleton and cleared in the end of each turn.