elixir-explorer / adbc

Apache Arrow ADBC bindings for Elixir
https://arrow.apache.org/adbc/
Apache License 2.0
50 stars 16 forks source link

Cache plugins on user cache dir #9

Closed josevalim closed 1 year ago

josevalim commented 1 year ago

Given the plugins are immutable, we can download and cache them somewhere global. So the idea is:

  1. Download them and write them to disk to the cache directory (if not yet cached)
  2. Then read the zip files (without cooked mode)

For the cache directory, we can use this (copied from bumblebee):

  defp adbc_cache_dir() do
    if dir = System.get_env("ADBC_CACHE_DIR") do
      Path.expand(dir)
    else
      :filename.basedir(:user_cache, "adbc")
    end
  end