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

How to append two value to one key using Redis Spring Data

$
0
0

I using redis caching my project but i have a problem. I had model student and write method put it to redis.First method i write findStudent one week and put it to cache.

public void findStudentOneWeek(List<Student> students1) {    redistemplate.opsForHash().put("Student", student.getId(), List<Customers>);}

Second method I write findStudent one day.

public void findStudentOneDay(List<Student> students2) {    redistemplate.opsForHash().put("Student", student.getId(), List<Customers>);}

But i want total user from 8 day. It mean i want hold one key Student but new value equal total value method findStudentOneWeek+ total value method findStudentOneDay. But i don't now how to do. I can't find method working it. I know method put from redis but it remove old value and save new value. I don't want it. I want value total.


Viewing all articles
Browse latest Browse all 2223

Latest Images

Trending Articles



Latest Images

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