Type-safe commands, Resource-managed connections, and a Rust-powered core. Domain errors are values, not exceptions.
import cats.effect.*
import dev.profunktor.valkey4cats.Valkey
import dev.profunktor.valkey4cats.model.ValkeyResponse.Ok
object App extends IOApp.Simple:
def run: IO[Unit] =
Valkey[IO].utf8("valkey://localhost").use { cmd =>
for
_ <- cmd.set("key", "hello, valkey")
res <- cmd.get("key")
_ <- res match
case Ok(Some(v)) => IO.println(s"Got: $v")
case _ => IO.unit
yield ()
}Everything you need to build reliable, high-throughput applications with Valkey.
Tagless final with typed keys and values. Smart constructors validate config at compile time via Codec type class.
Resource-managed connections. Domain errors are values via ValkeyResponse ADT — pattern match, don't catch.
Valkey Glide handles pooling, cluster topology, and client-side caching in its Rust engine. Scala gets the ergonomics.
Strings, Hashes, Lists, Sets, Sorted Sets, Streams, Geo, Bitmaps, HyperLogLog, Scripting, and more.
ip4s types for host/port, Either-based smart constructors, opaque types for database IDs. Invalid states are unrepresentable.
Local TTL-based caching with configurable eviction (LRU/LFU) and observable hit/miss metrics.