JanusGraph / JanusGraph/janusgraph
Invalidating db-cache for select vertices only
- Dominant language
- Java
- Stars
- 5.8k
- Forks
- 1.2k
- Avg merge
- 13h 53m
- Merged PRs (30d)
- 6
Description
I would like to request an API for selectively invalidating vertices in the database-level cache described in [11.3 Database-Level Caching](http://docs.janusgraph.org/latest/caching.html).
**Use Case**
When running multiple instances of JanusGraph on different servers, one may update a certain vertex and notify other servers of the update by vertex ID. If another server acts upon the update by e.g. pushing a change event to clients, it prepares a JSON representation of the vertex to transmit. This JSON representation is likely to contain stale data from the db-cache.
Any way to circumvent the cache and directly fetch data from the storage backend would be great, without having to disable the cache altogether.
**Example**
APIs like these would be handy:
`Vertex::invalidateCache()`
`JanusGraph::invalidateCache(Object... ids)`
Contributor guide
Research direction
Start with the Database-Level Caching section in the linked documentation and examine how the database-level cache is exposed. Define the scope of selective invalidation for vertex IDs, including the Vertex::invalidateCache() and JanusGraph::invalidateCache(Object... ids) examples. Done means callers can bypass or invalidate cached data for selected vertices without disabling the cache globally.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100