diff --git a/lib/kanta/cache.ex b/lib/kanta/cache.ex index 4816813..d068058 100644 --- a/lib/kanta/cache.ex +++ b/lib/kanta/cache.ex @@ -18,7 +18,13 @@ defmodule Kanta.Cache do # this old way is just broken for preloads lists # encoded_list = (Enum.into(val, %{}) |> URI.encode_query()) # the new way is robust and reversible - encoded_list = val |> :erlang.term_to_binary() |> URI.encode() |> then(&%{encoded_params: &1}) |> URI.encode_query() + encoded_list = + val + |> :erlang.term_to_binary() + |> URI.encode() + |> then(&%{encoded_params: &1}) + |> URI.encode_query() + acc <> "_" <> to_string(key) <> "_" <> encoded_list _val ->