Skip to content
This repository was archived by the owner on Feb 9, 2019. It is now read-only.
This repository was archived by the owner on Feb 9, 2019. It is now read-only.

Redis Java 2.5.X #177

@djlitvak

Description

@djlitvak

Previously, I had a question in here regarding something I was running into. Instead, I am going to post the answer and ask a new question.

Using the Redis plugin on 2.5.x, I have added the injection of the JedisPool and declared a jedis class variable.

`
@Inject
JedisPool jedisPool;

Jedis jedis;
`

I have a method called "connect" that checks if jedis is null. If it is null, then it attempts to run jedis = jedisPool.getResource().

Currently, before any cache operation, I call the connect method.

I feel like this is overkill and wrong. Do you guys have any suggestions for how to manage this? Is there a way with Play 2.5.x and Java to use the CacheApi?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions