diff --git a/sat/tools/common/async_utils.py b/sat/tools/common/async_utils.py index e2912ea8..bf14c594 100644 --- a/sat/tools/common/async_utils.py +++ b/sat/tools/common/async_utils.py @@ -27,8 +27,13 @@ from sat.core.log import getLogger log = getLogger(__name__) -def async_lru(maxsize: Optional[int] = None) -> Callable: - """Decorator to cache async function results using LRU algorithm""" +def async_lru(maxsize: Optional[int] = 50) -> Callable: + """Decorator to cache async function results using LRU algorithm + + @param maxsize: maximum number of items to keep in cache. + None to have no limit + + """ def decorator(func: Callable) -> Callable: cache = OrderedDict() async def wrapper(*args) -> Awaitable: