spring-data-redis

delete key/value from redis - phantom key not deleted

萝らか妹 提交于 2020-08-23 04:23:20
问题 I'm using a Spring Redis repository and I'm puzzled with the delete operation and the phantom key. When a delete is performed, the phantom key is not deleted, is it a normal behaviour ? If yes, is it possible to force a deletion of the phantom key when the original key is deleted from the code. I was expecting that a delete removes the original key AND the associated phantom key. I planned to use to timeToLive feature to ensure that keys not deleted by my application will expire after a while

Unable to get result from the Redis using Crud Repository in Spring Boot?

走远了吗. 提交于 2020-07-05 16:24:55
问题 I am developing Spring Boot + Redis example. I've taken a reference from link : https://www.baeldung.com/spring-data-redis-tutorial. In this example, I developed repository method Student findByNameAndGender(String name, Gender gender); and even the Student findByName(String name); , but I am not getting any result back on both cases.? Any quick help? Redis query - redis 127.0.0.1:6379> KEYS * 1) "Student" 2) "Student:bb4df14a-7f42-4fc3-b608-fc4b7d45109e" 3) "Student:69affaa4-e56c-49e3-9ef4