Keys API

Purely functional interface for the Keys API.

key Commands usage

Once you have acquired a connection you can start using it:

import cats.effect.IO
import cats.syntax.all._

val key = "users"

commandsApi.use { cmd => // KeyCommands[IO, String]
  for {
    _ <- cmd.del(key)
    _ <- cmd.exists(key)
    _ <- cmd.expire(key, Duration(5, SECONDS))
  } yield ()
}