arcgis_geocode v0.3.0 ArcgisGeocode.TokenCache View Source

A GenServer implementation for storing an API authentication token (and its expiration date) in an ETS table. By caching the token, many geocoding requests can be made with the library handling the token behind the scenes.

Link to this section Summary

Functions

Retrieves a cached authentication token from an ETS table along with its expiration date

Puts an authentication token into an ETS table along with its expiration date

Called by the Arcgis application on start

Link to this section Functions

Link to this function lookup() View Source
lookup() :: {:ok, {String.t(), any()} | nil}

Retrieves a cached authentication token from an ETS table along with its expiration date.

Link to this function put(token, expiry) View Source
put(String.t(), any()) :: {:ok, String.t()}

Puts an authentication token into an ETS table along with its expiration date.

Called by the Arcgis application on start.