INNER CODE UNIT · Python

_CachierWrappedFunc

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

class _CachierWrappedFunc(Protocol[_P, _R_co]):
    """Callable returned by ``@cachier`` with the decorated function's signature.

    Preserves the original function's parameter and return types via ``ParamSpec`` while also exposing the cache-
    management attributes attached by the decorator. Per-call cachier options such as ``max_age`` and
    ``cachier__skip_cache`` are accepted at runtime but are not surfaced in the ``__call__`` signature here; PEP 612
    does not permit mixing ParamSpec kwargs with additional keyword-only parameters.

    """

    def __call__(self, *args: _P.args, **kwargs: _P.kwargs) -> _R_co: ...  # pragma: no cover

    clear_cache: Callable[[], Any]
    clear_being_calculated: Callable[[], Any]
    aclear_cache: Callable[[], Any]
    aclear_being_calculated: Callable[[], Any]
    cache_dpath: Callable[[], Optional[str]]
    precache_value: Callable[..., Any]

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…