|
@@ -134,6 +134,13 @@ public class RedisService { |
|
|
return retry(() -> getRedis().get(prefix(key)), "get"); |
|
|
return retry(() -> getRedis().get(prefix(key)), "get"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @param key |
|
|
|
|
|
* @return TTL in seconds for the given key |
|
|
|
|
|
*/ |
|
|
|
|
|
public Long get_ttl(@NonNull final String key) { |
|
|
|
|
|
return retry(() -> getRedis().ttl(prefix(key)), "ttl"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
public void set(@NonNull final String key, @NonNull final String value) { |
|
|
public void set(@NonNull final String key, @NonNull final String value) { |
|
|
retry(() -> getRedis().set(prefix(key), encrypt(value)), "set"); |
|
|
retry(() -> getRedis().set(prefix(key), encrypt(value)), "set"); |
|
|