Skip to content

Commit

Permalink
Update readme, Travis for Redis impl
Browse files Browse the repository at this point in the history
  • Loading branch information
cb372 committed Nov 16, 2013
1 parent 4f45529 commit 5d3645a
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ jdk:
- oraclejdk7
services:
- memcached
- redis
script: "sbt coveralls"
29 changes: 28 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The following cache implementations are supported, and it's super-easy to plugin
* Google Guava
* Memcached
* Ehcache
* Redis (TODO)
* Redis

## How to use

Expand Down Expand Up @@ -140,3 +140,30 @@ val underlying: net.sf.ehcache.Cache = cacheManager.getCache("myCache")
implicit val cacheConfig = CacheConfig(EhcacheCache(underlying))
```

### Redis

SBT:

```
libraryDependencies += "com.github.cb372" %% "cacheable-redis" % "0.1"
```

Usage:

```scala
import cacheable._
import redis._

implicit val cacheConfig = CacheConfig(RedisCache("host1", 6379))
```

or provide your own Redis client, like this:

```scala
import cacheable._
import redis._
import com.redis.RedisClient

val redisClient = new RedisClient(...)
implicit val cacheConfig = CacheConfig(RedisCache(redisClient))
```

0 comments on commit 5d3645a

Please sign in to comment.