from _typeshed import Incomplete
from docassemble.base.mako import util as util

_cache_plugins: Incomplete
register_plugin: Incomplete

class Cache:
    impl: Incomplete
    id: Incomplete
    starttime: Incomplete
    template: Incomplete
    _def_regions: Incomplete
    def __init__(self, template, *args) -> None: ...
    def _load_impl(self, name): ...
    def get_or_create(self, key, creation_function, **kw): ...
    def _ctx_get_or_create(self, key, creation_function, context, **kw): ...
    def set(self, key, value, **kw) -> None: ...
    put: Incomplete
    def get(self, key, **kw): ...
    def invalidate(self, key, **kw) -> None: ...
    def invalidate_body(self) -> None: ...
    def invalidate_def(self, name) -> None: ...
    def invalidate_closure(self, name) -> None: ...
    def _get_cache_kw(self, kw, context): ...

class CacheImpl:
    cache: Incomplete
    def __init__(self, cache) -> None: ...
    pass_context: bool
    def get_or_create(self, key, creation_function, **kw) -> None: ...
    def set(self, key, value, **kw) -> None: ...
    def get(self, key, **kw) -> None: ...
    def invalidate(self, key, **kw) -> None: ...
