diff --git a/lib/ex_secrets.ex b/lib/ex_secrets.ex index b9758f1..88404a7 100644 --- a/lib/ex_secrets.ex +++ b/lib/ex_secrets.ex @@ -85,6 +85,11 @@ defmodule ExSecrets do end end + + @doc """ + Internal function for fetching secret with provide for catching and rate limiting. + Do not rely on this function. + """ def get_using_provider(key, provider) do with provider when is_atom(provider) <- Resolver.call(provider), value <- Kernel.apply(provider, :get, [key]) do @@ -120,8 +125,9 @@ defmodule ExSecrets do end end - def clear_cache(), do: GenServer.call(Cache, :clear) - + @doc """ + Resets cache and reloads all providers. + """ def reset() do n = GenServer.call(:ex_secrets_cache_store, :clear) ExSecrets.Application.get_providers() |> Enum.each(&Kernel.apply(&1, :reset, [])) diff --git a/mix.exs b/mix.exs index 64ea098..ee7b714 100644 --- a/mix.exs +++ b/mix.exs @@ -4,7 +4,7 @@ defmodule ExSecrets.MixProject do def project do [ app: :ex_secrets, - version: "0.2.0", + version: "0.2.1", elixir: "~> 1.13", build_embedded: Mix.env() == :prod, start_permanent: Mix.env() == :prod,