I am unfamiliar with the general problem you are solving for, but I am interested in graph dependencies in general. May I ask, How many nodes are in a typical graph? Is there a possibility of cycles?
Thanks
Thanks
Cycles are reasonably possible, if two cached items depend upon each other. For example, if you store the text of the last comment a user made on HN inside the "user" cache entry, and the user edited their most-recent comment, you would have to invalidate not only the comment but also the user.
Stash treats dependencies as a DAG (directed acyclic graph). During traversal when a node is invalidated, it's aware of the potential of cycles and won't backtrack over paths its already examined.