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

Potential memory leak due to spring-data-redis

$
0
0

Why does spring-data-redis stores primary key for every "hash" in a different set? For example, if we create an entity:

@RedisHash(timeToLive=10, value="event")class Event {    @Id    private String id;    ...    private String otherField;}

And then use CrudRepository<T, ID> to store objects into redis, then we could see:

  1. a set named event and,
  2. a hash for every object we save.

My question is, why does spring-data-redis stores all the IDs into a different set? The entries of this set are not cleared even after the ttl of a hash expires. Wouldn't this create a memory leak? Or is there a config that I'm missing?


Viewing all articles
Browse latest Browse all 2222

Trending Articles



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