1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2020 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!(_, _, func) do
30 def get_and_update(_, _, func) do
35 def expire_at(_, _, _), do: {:ok, true}
38 def exists?(_, _), do: {:ok, false}
41 def execute!(_, func) do
46 def del(_, _), do: {:ok, true}