Building on top of Mint

I’d like to use Mint (HTTP) to occasionally fetch some config from a server and cache it. Does anyone have any good advice on a decent process/supervision architecture for such a feature? Given that the requests would be infrequent.

I’d like to avoid any other dependencies beyond mint/castore to gain a better understanding of using OTP.

Thanks in advance for any ideas.

1 Like

You could make a GenServer that triggers an action on itself using Process.send_after(self(), :action, 60_000)
Then receive the messages of Mint in that GenServer and do whatever needs to be done with the config.