g-andrade / locus

MMDB reader for geolocation and ASN lookup of IP addresses
https://hexdocs.pm/locus/
MIT License
111 stars 15 forks source link

Allow to customise cache file path #33

Closed bszaf closed 2 years ago

bszaf commented 2 years ago

This change allows to customise file path for database cache. The default location remains the same.

The main motivation for this change is the scenario, where remote database is used. If the download fails on first download attempt, there is no fallback. Being able to customise file path allows to ship some fallback database with a release and easily point to it. The default location, which is user_cache dir, is harder to provision.

bszaf commented 2 years ago

Applied review suggestions - requesting a review again.