Fix the issue where subgraph does not work under --cache-none mode (#10329)

This commit is contained in:
HelloClyde 2025-10-15 17:09:40 +08:00 committed by GitHub
parent 1c10b33f9b
commit 7a79d9add3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -418,8 +418,11 @@ class DependencyAwareCache(BasicCache):
The subcache object for the node.
"""
subcache = await super()._ensure_subcache(node_id, children_ids)
await self.cache_key_set.add_keys(children_ids)
for child_id in children_ids:
self.descendants[node_id].add(child_id)
if child_id not in self.ancestors:
self.ancestors[child_id] = set()
self.ancestors[child_id].add(node_id)
return subcache