I can't find it explicitly in https://docs.spring.io/spring-data/redis/docs/current/reference/html/ but I was wondering if Redis supports Java streams so we can do
Stream<SomeDataStruct> findByServerIdAndSiteIdAndUserId(String serverId, String siteId, int userId);
And it will free up the resources as needed?
I know JPA does support streams, though I had to explicitly do a entityManager.detach(element) in order to prevent the entity manager taking up a lot of memory.
I was thinking it would be in their spring-data-commons but https://spring.io/projects/spring-data#learn do not have any links just labels.