faust.web.cache.backends.base

Cache backend - base implementation.

class faust.web.cache.backends.base.CacheBackend(app: AppT, url: Union[URL, str] = 'memory://', **kwargs: Any)[source]

Backend for cache operations.

logger: logging.Logger = <Logger faust.web.cache.backends.base (WARNING)>
Unavailable

alias of CacheUnavailable

operational_errors: ClassVar[Tuple[Type[BaseException], ...]] = ()
invalidating_errors: ClassVar[Tuple[Type[BaseException], ...]] = ()
irrecoverable_errors: ClassVar[Tuple[Type[BaseException], ...]] = ()
async get(key: str) Optional[bytes][source]

Get cached-value by key.

Return type:

_UnionGenericAlias[bytes, None]

async set(key: str, value: bytes, timeout: Optional[float] = None) None[source]

Set cached-value by key.

Return type:

None

async delete(key: str) None[source]

Forget value for cache key.

Return type:

None