libduvet/http/commands

Types

The space-command lists the client keeps for a few minutes, so that a room full of command uses doesn’t fetch them every time.

pub opaque type Cache

Values

pub fn clear(cache: Cache) -> Nil
pub fn forget(cache: Cache, space_id: String) -> Nil
pub fn get(
  cache: Cache,
  space_id: String,
  now: timestamp.Timestamp,
) -> option.Option(rest.SpaceCommands)
pub fn put(
  cache: Cache,
  space_id: String,
  at: timestamp.Timestamp,
  list: rest.SpaceCommands,
) -> Nil
pub fn start() -> Cache
✨ Search Document