scala
import scredis._
val pool = RedisPool()
pool.withClient { client =>
}
scala
import scredis._
val pool = RedisPool()
pool.withClient { client =>
val batch = client.pipeline()
batch.hget("mykey", "field1")
batch.hget("mykey", "field2")
batch.hget("mykey", "field3")
val results = batch.sync().asInstanceOf[List[Option[String]]]
}
scala
import scala.concurrent.Future
import scala.concurrent.ExecutionContext.Implicits.global
import scredis._
val pool = RedisPool()
pool.withClient { client =>
val futureResult: Future[Option[String]] = client.get("mykey")
futureResult.onComplete {
case scala.util.Success(result) =>
case scala.util.Failure(ex) =>
}
}