Fork of Pleroma with site-specific changes and feature branches https://git.pleroma.social/pleroma/pleroma
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

20 linhas
1.1KB

  1. # Pleroma: A lightweight social networking server
  2. # Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
  3. # SPDX-License-Identifier: AGPL-3.0-only
  4. defmodule Pleroma.Caching do
  5. @callback get!(Cachex.cache(), any()) :: any()
  6. @callback get(Cachex.cache(), any()) :: {atom(), any()}
  7. @callback put(Cachex.cache(), any(), any(), Keyword.t()) :: {Cachex.status(), boolean()}
  8. @callback put(Cachex.cache(), any(), any()) :: {Cachex.status(), boolean()}
  9. @callback fetch!(Cachex.cache(), any(), function() | nil) :: any()
  10. # @callback del(Cachex.cache(), any(), Keyword.t()) :: {Cachex.status(), boolean()}
  11. @callback del(Cachex.cache(), any()) :: {Cachex.status(), boolean()}
  12. @callback stream!(Cachex.cache(), any()) :: Enumerable.t()
  13. @callback expire_at(Cachex.cache(), binary(), number()) :: {Cachex.status(), boolean()}
  14. @callback exists?(Cachex.cache(), any()) :: {Cachex.status(), boolean()}
  15. @callback execute!(Cachex.cache(), function()) :: any()
  16. @callback get_and_update(Cachex.cache(), any(), function()) ::
  17. {:commit | :ignore, any()}
  18. end