faust.web.cache.backends.base

Cache backend - base implementation.

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

Backend for cache operations.

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

alias of faust.web.cache.exceptions.CacheUnavailable

operational_errors = ()
invalidating_errors = ()
irrecoverable_errors = ()
async get(key: str) → Optional[bytes][source]

Get cached-value by key.

Return type

Optional[bytes]

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

Set cached-value by key.

Return type

None

async delete(key: str) → None[source]

Forget value for cache key.

Return type

None