arcgis_geocode v0.2.0 ArcgisGeocode.TokenCache

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.

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

Functions

lookup()

Specs

lookup :: {:ok, {String.t, any} | nil}

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

put(token, expiry)

Specs

put(String.t, any) :: {:ok, String.t}

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

start_link()

Called by the Arcgis application on start.