faust.web.cache.backends.memory

In-memory cache backend.

class faust.web.cache.backends.memory.CacheStorage[source]

In-memory storage for cache.

get(key: KT) Optional[VT][source]

Get value for key, or None if missing.

Return type:

_UnionGenericAlias[~VT, None]

last_set_ttl(key: KT) Optional[float][source]

Return the last set TTL for key, or None if missing.

Return type:

_UnionGenericAlias[float, None]

expire(key: KT) None[source]

Expire value for key immediately.

Return type:

None

set(key: KT, value: VT) None[source]

Set value for key.

Return type:

None

setex(key: KT, timeout: float, value: VT) None[source]

Set value & set timeout for key.

Return type:

None

ttl(key: KT) Optional[float][source]

Return the remaining TTL for key.

Return type:

_UnionGenericAlias[float, None]

delete(key: KT) None[source]

Delete value for key.

Return type:

None

clear() None[source]

Clear all data.

Return type:

None

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

In-memory backend for cache operations.