ATECC508A.Transport.Cache (atecc508a v1.4.0)

Copy Markdown View Source

Simple cache for reducing unnecessary traffic to the ATECC508A

Summary

Functions

Returns a specification to start this module under a supervisor.

Check the cache for the request

Selectively cache responses

Types

response()

@type response() :: {:ok, binary()} | {:error, any()}

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

get(pid, request)

@spec get(GenServer.server(), binary()) :: response() | nil

Check the cache for the request

put(pid, request, response)

@spec put(GenServer.server(), binary(), response()) :: :ok

Selectively cache responses

start_link()

@spec start_link() :: GenServer.on_start()