-
Notifications
You must be signed in to change notification settings - Fork 16
Client
Alexandre Curreli edited this page Sep 17, 2013
·
7 revisions
Client.scala implements a basic synchronous client. It is not thread-safe. See Client pooling and Redis asynchronous client for multi-threaded execution.
import scredis._
// Creates a client with default parameters (see the configuration section for the complete list)
val client = Client()
// Creates a client by overriding some of the parameters
val myClient = Client(port = 6380, password = Some("foobar"))
client.set("STR", "Hello World!")
val str = client.get("STR") // Some("Hello World!")
// Closes the connection with the server
client.quit()
myClient.quit()