I'm putting string to redis server:
stringRedis.opsForValue().set(redisKey, email, ACTIVATION_CODE_TIMEOUT);
But I finally got '\x00\x00\x00\x00 ... my-value' in redis:
Why is this happening?
Sorry about this asking. It's my fault. I made mistakes about using the set()
method. The third parameter of set() method is not timeout value. It's offset. To fix it:
stringRedis.opsForValue().set(redisKey, email, ACTIVATION_CODE_TIMEOUT, TimeUnit.SECONDS);