开发者

Lift w/Redis examples

开发者 https://www.devze.com 2023-03-24 22:18 出处:网络
开发者_如何转开发I\'ve been playing around with Redis and Scala separately, and thought it\'d be neat to combine them in a simple Lift app.
开发者_如何转开发

I've been playing around with Redis and Scala separately, and thought it'd be neat to combine them in a simple Lift app.

I've done a fair bit of Googling and can't find any examples of a Lift app that uses Redis. Is there a reason for this?

What drivers/APIs do you recommend for using Redis w/Lift? I'm currently working with Jedis (https://github.com/xetorthio/jedis).


I use scalatra with jedis as the connector to redis, works fine as well. Java data types will be converted to equivalents in scala implicitly when scala.collection.JavaConversions._ is imported (in scala 2.8 or later). To use jedis, simply add this line to your project definition file in sbt 0.7.x:

val jedis = "redis.clients" % "jedis" % "2.0.0"

or this in sbt 0.10.x:

libraryDependencies += "redis.clients" % "jedis" % "2.0.0"


I have tested a couple of scala redis connectors - settled on https://github.com/debasishg/scala-redis for further testing.

Simply

val scalaredis = "net.debasishg" % "redisclient_2.9.0" % "2.3.1"

in SBT


According to http://mvnrepository.com/artifact/net.debasishg/redisclient_2.9.1,

libraryDependencies += "net.debasishg" %% "redisclient" % "2.7"
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号