MapkitJS.TokenCache (mapkit_js v0.3.0)

Copy Markdown View Source

Caches the MapKit JS JWT so callers don't need to sign a new token on every request.

Summary

Functions

Returns a specification to start this module under a supervisor.

Clear the cached token, forcing a new token on next fetch.

Fetch a cached token, generating a new one if expired or not present.

Start the token cache GenServer.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

clear(server \\ __MODULE__)

Clear the cached token, forcing a new token on next fetch.

fetch(server \\ __MODULE__)

Fetch a cached token, generating a new one if expired or not present.

start_link(opts \\ [])

Start the token cache GenServer.