Document deprecation
[akkoma] / test / support / null_cache.ex
index 72e7c996a78788512d50a43ba93ba38dea7d4e75..c63df6a3993268b8ec4afd0d2b2210c23a87e309 100644 (file)
@@ -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