Try the JedisPool. the implementation of redis.

You need to disable the default cache module before using the redis cache. play.modules.disabled = ["play.api.cache.EhCacheModule"]

In the build.sbt.

"" %% "play-modules-redis" % "2.4.0",


You can use the cache in any class of your project, I used the following code in my java project:

public class ProductServiceImpl implements ProductService {

    private final WSClient ws;
    private UserService userService;
    private CacheApi cache;

    public ProductServiceImpl(WSClient ws) { = ws;

    public void setCache(CacheApi cache) {
        this.cache = cache;

    public void setUserService(UserService userService) {
        this.userService = userService;


But in Scala I assume that you can do something like this:

import javax.inject._
import play.api.cache._

class Model @Inject() (cache: CacheApi) {
  // ...


The @Inject annotation can be used on fields or on constructors

More info about how to use the @Inject annotation on play scala:

Related Query

More Query from same tag