Kdb.Cache behaviour (Kdb v0.1.1)

Link to this section Summary

Link to this section Callbacks

Link to this callback

cleanup(older_than)

@callback cleanup(older_than :: integer()) :: integer()
Link to this callback

delete(database, bucket, id)

@callback delete(database :: atom(), bucket :: atom(), id :: binary()) :: any()
@callback init() :: :ignore
Link to this callback

put(database, bucket, id, ttl)

@callback put(database :: atom(), bucket :: atom(), id :: binary(), ttl :: integer()) ::
  boolean()

Link to this section Functions

Link to this function

cleanup(older_than)

@spec cleanup(older_than :: integer()) :: integer()
Link to this function

delete(dbname, bucket, id)

@spec delete(atom(), atom(), binary()) :: true

Inicia el módulo de hits creando la tabla ETS.

Link to this function

put(dbname, bucket, id, ttl)

@spec put(
  database :: atom(),
  bucket_name :: atom(),
  key :: binary(),
  ttl :: integer()
) :: boolean()