INNER CODE UNIT · Python

_call_async

python-cachier/cachier · src/cachier/core.py:623

        async def _call_async(*args, max_age: Optional[timedelta] = None, **kwds):
            # NOTE: For async functions, wait_for_calc_timeout is not honored.
            # Instead of blocking the event loop waiting for concurrent
            # calculations, async functions will recalculate in parallel.
            # This avoids deadlocks and maintains async efficiency.
            nonlocal allow_none, last_cleanup
            _allow_none = _update_with_defaults(allow_none, "allow_none", kwds)
            # print('Inside async wrapper for {}.'.format(func.__name__))
            ignore_cache = _pop_kwds_with_deprecation(kwds, "ignore_cache", False)
            overwrite_cache = _pop_kwds_with_deprecation(kwds, "overwrite_cache", False)
            verbose = _pop_kwds_with_deprecation(kwds, "verbose_cache", False)
            ignore_cache = kwds.pop("cachier__skip_cache", ignore_cache)
            overwrite_cache = kwds.pop("cachier__overwrite_cache", overwrite_cache)
            verbose = kwds.pop("cachier__verbose", verbose)
            _stale_after = _update_with_defaults(stale_after, "stale_after", kwds)
            _next_time = _update_with_defaults(next_time, "next_time", kwds)
            _cleanup_flag = _update_with_defaults(cleanup_stale, "cleanup_stale", kwds)
            _cleanup_interval_val = _update_with_defaults(cleanup_interval, "cleanup_interval", kwds)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…