X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=test%2Fsupport%2Fnull_cache.ex;h=c63df6a3993268b8ec4afd0d2b2210c23a87e309;hb=2b93351bd7b1377793256a14c0356e1dccf36d2e;hp=72e7c996a78788512d50a43ba93ba38dea7d4e75;hpb=95a9bdfc374a013be47e74b25bdba5d91f51948b;p=akkoma diff --git a/test/support/null_cache.ex b/test/support/null_cache.ex index 72e7c996a..c63df6a39 100644 --- a/test/support/null_cache.ex +++ b/test/support/null_cache.ex @@ -21,9 +21,11 @@ defmodule Pleroma.NullCache do def get(_, _), do: {:ok, nil} @impl true - def fetch!(_, _, func) do - {_, res} = func.() - res + def fetch!(_, key, func) do + case func.(key) do + {_, res} -> res + res -> res + end end @impl true