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:
- a
set
namedevent
and, - a
hash
for every object we save.
My question is, why does spring-data-redis
stores all the ID
s 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?