<commit_before>defmodule BittorrentClient.Cache do
  @moduledoc """
  """
  @type reason :: String.t()
  @type key :: tuple()
  @type cache_ref :: atom() | String.t() | pid()

  @doc """
  Creates a new cache
  """
  @callback new(cache_ref, [any()]) :: {:ok, pid} | {:error, reason}

  @doc """
  Retrieves value for a given key from cache, 
  returns error if the given key does not exist
  """
  @callback get(cache_ref, key) :: {:ok, any()} | {:error, :not_found}

  @doc """
  Sets value for a given key, 
  returns error if the given key could not be set
  """
  @callback set(cache_ref, key, value :: any()) :: :ok | {:error, reason}

  @doc """
  Returns all the contents of the given cache
  """
  @callback getAll() :: [tuple()]

  @doc """
  Deletes given key from cache
  """
  @callback delete(cache_ref, key) :: :ok
end<commit_msg>fixed behaviour callback def for get all<commit_after>defmodule BittorrentClient.Cache do
  @moduledoc """
  """
  @type reason :: String.t()
  @type key :: tuple()
  @type cache_ref :: atom() | String.t() | pid()

  @doc """
  Creates a new cache
  """
  @callback new(cache_ref, [any()]) :: {:ok, pid} | {:error, reason}

  @doc """
  Retrieves value for a given key from cache, 
  returns error if the given key does not exist
  """
  @callback get(cache_ref, key) :: {:ok, any()} | {:error, :not_found}

  @doc """
  Sets value for a given key, 
  returns error if the given key could not be set
  """
  @callback set(cache_ref, key, value :: any()) :: :ok | {:error, reason}

  @doc """
  Returns all the contents of the given cache
  """
  @callback get_all(cache_ref) :: [tuple()]

  @doc """
  Deletes given key from cache
  """
  @callback delete(cache_ref, key) :: :ok
end
{'fraction_non_alphanumeric': 0.16328894035900404, 'fraction_numerical': 0.0, 'mean_word_length': 3.4883116883116885, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7307311', 'n_tokens_mistral': 598, 'n_tokens_neox': 575, 'n_words': 205}