On Sunday, April 8, 2012 11:16:27 AM UTC-5, charu tyagi wrote:
is query caching present in neo4j??????????reply me plzzzzzzzzzz as
soooon as possible
Neo4j doesn't cache the actual query, but you can accomplish this by returning the element IDs instead of returning the actual elements,
Cache the element ID list in your app (or in Redis, etc), and use Cypher to do a mutli-get on the IDs:
START x = node({ids} RETURN x
Neo4j caches the elements as they are accessed. If the entire DB fits in memory, you can you use Gremlin to warm the cache...
def warm_cache() {
for (vertex in g.getVertices()) {
vertex.getOutEdges()
}
}
...otherwise, the elements will be cached after they are first accessed.
- James
- James