1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.NullCache do
7 A module simulating a permanently empty cache.
9 @behaviour Pleroma.Caching
12 def get!(_, _), do: nil
15 def put(_, _, _, _ \\ nil), do: {:ok, true}
18 def stream!(_, _), do: []
21 def get(_, _), do: {:ok, nil}
24 def fetch!(_, key, func) do
32 def get_and_update(_, _, func) do
37 def expire_at(_, _, _), do: {:ok, true}
40 def exists?(_, _), do: {:ok, false}
43 def execute!(_, func) do
48 def del(_, _), do: {:ok, true}