Recommendation of a cache method

I have a complex query that involves ordering and traversing over several node types to obtain something like a cluster, the issue is when I have large number of nodes the query start to take longer time to evaluate. The use case is a user clicking on a word from a UI and I obtain a cluster of what come with it, What could be a possible way to cache the result, the result is not a number nor a string, its kind of array of a projection of several attributes calculated through the query. I thought about using hashmap of redis to cache result but that will need tons of memory, So that would save me the re-doing of the same query again and again. The used env. AWS Neptune + gremlin + python
D
Dave385d ago
Have you looked at the result cache feature of Neptune? https://docs.aws.amazon.com/neptune/latest/userguide/gremlin-results-cache.html
Caching query results in Amazon Neptune Gremlin - Amazon Neptune
Overview of using the query results cache with Gremlin.