Home / Companies / Neo4j / Blog / Post Details
Content Deep Dive

Caching Partial Traversals in Neo4j

Blog post from Neo4j

Post Details
Company
Date Published
Author
Neo4j Staff
Word Count
1,016
Company Posts That Month
4
Language
English
Hacker News Points
-
Post removed?
No
Summary

This Neo4j query is inefficient as it traverses the same relationships multiple times, resulting in unnecessary computation and potential performance issues. To optimize this, a caching solution can be implemented to store the results of frequently executed queries. In this example, a LoadingCache is created using Google Guava to cache the "peopleWants" and "peopleHas" data, which reduces the number of traversals required. Another cache is created for the "cities" data, but with a refresh interval to keep it up-to-date every 10 minutes. This approach can help improve performance in recommendation engines using Collaborative Filtering.

Trends Found in this Post

No tracked trend matches for this post yet.

Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.