Quantcast
Channel: Active questions tagged redis+java - Stack Overflow
Viewing all articles
Browse latest Browse all 2204

redisTemplate.opsForList().rightPush is slow

$
0
0

I have a java interface,code is

1. check_param..2. check_quota: the step will operate redis3. construct data..4. push data to queue: redisTemplate.opsForList().rightPush(FAVORITES_RECORD_BLOCKING_QUEUE_KEY, JSON.toJSONString(favorite));

when i reboot my program, in 4th step ,it will consumed above 200ms, and after this,just consumed 3-5ms ,i want to know why.

First I think maybe program get redis connect,so consumed so much time,but in 2th step,it executed :redisTemplate.opsForValue().set(key, count,30,TimeUnit.MINUTES);i have no idea ,please help me


Viewing all articles
Browse latest Browse all 2204

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>