Skip to content

Commit

Permalink
module for cache to be implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
ericklima-ca committed Oct 28, 2021
1 parent 31d5b13 commit a59d4e1
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions lib/get_geocode/geocode_cache.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# TO BE IMPLEMENTED !!!
# defmodule GetGeocodeCash do
# use GenServer

# def init(state) do
# {:ok, state}
# end

# def handle_cast({:store, new_data}, _state) do
# {:noreply, new_data}
# end

# def handle_call({:get, cep}, _from, data) do
# result = Map.get(data, cep)
# {:reply, result, data}
# end

# def start_link(state \\ []) do
# GenServer.start_link(__MODULE__, state, name: __MODULE__)
# end

# def store(new_data) do
# GenServer.cast(__MODULE__, {:store, new_data})
# end

# def get(cep) do
# GenServer.call(__MODULE__, {:get, cep})
# end
# end

0 comments on commit a59d4e1

Please sign in to comment.