CacheStore class

Definition

ABC for cache store.

CacheStore(max_retries: int = 3) -> None
Inheritance
builtins.object
CacheStore

Methods

add(keys: typing.Iterable[str], values: typing.Iterable[typing.Any]) -> None

Add to store.

get(keys: typing.Iterable[str], default: typing.Union[typing.Any, NoneType] = None) -> typing.Dict[typing.Any, typing.Union[typing.Any, NoneType]]

Get value from store.

load()

Load - abstract method.

log_activity(custom_dimensions: typing.Union[typing.Dict[str, typing.Any], NoneType] = None) -> typing.Any

Log activity collects the execution latency.

remove(key: str) -> None

Remove from store.

remove_all() -> None

Remove all entry from store.

set(key: str, value: typing.Any) -> None

Set value to store.

unload()

Unload - abstract method.

add(keys: typing.Iterable[str], values: typing.Iterable[typing.Any]) -> None

Add to store.

add(keys: typing.Iterable[str], values: typing.Iterable[typing.Any]) -> None

Parameters

keys

store key

values

store value

get(keys: typing.Iterable[str], default: typing.Union[typing.Any, NoneType] = None) -> typing.Dict[typing.Any, typing.Union[typing.Any, NoneType]]

Get value from store.

get(keys: typing.Iterable[str], default: typing.Union[typing.Any, NoneType] = None) -> typing.Dict[typing.Any, typing.Union[typing.Any, NoneType]]

Parameters

default

default value

keys

store keys

Returns

values

load()

Load - abstract method.

load()

log_activity(custom_dimensions: typing.Union[typing.Dict[str, typing.Any], NoneType] = None) -> typing.Any

Log activity collects the execution latency.

log_activity(custom_dimensions: typing.Union[typing.Dict[str, typing.Any], NoneType] = None) -> typing.Any

Parameters

custom_dimensions

custom telemetry dimensions

Returns

log activity

remove(key: str) -> None

Remove from store.

remove(key: str) -> None

Parameters

key

store key

remove_all() -> None

Remove all entry from store.

remove_all() -> None

set(key: str, value: typing.Any) -> None

Set value to store.

set(key: str, value: typing.Any) -> None

Parameters

key

store key

value

store value

unload()

Unload - abstract method.

unload()