INNER CODE UNIT · Python
func_wrapper
python-cachier/cachier · src/cachier/core.py:727
async def func_wrapper(*args: _P.args, **kwargs: _P.kwargs) -> _R:
return await _call_async(*args, **kwargs) # type: ignore[arg-type]
else:
@wraps(func)
def func_wrapper(*args: _P.args, **kwargs: _P.kwargs) -> _R:
return _call(*args, **kwargs) # type: ignore[arg-type]
def _clear_cache():
"""Clear the cache."""
core.clear_cache()
if is_coroutine:
return _ImmediateAwaitable()
return None
def _clear_being_calculated():
"""Mark all entries in this cache as not being calculated."""