mirror of
https://github.com/safishamsi/graphify.git
synced 2026-09-26 07:25:50 +00:00
fix(cache): scope semantic cache writes to extracted files (#1757)
This commit is contained in:
@@ -374,7 +374,8 @@ from graphify.cache import save_semantic_cache
|
||||
from pathlib import Path
|
||||
|
||||
new = json.loads(Path('graphify-out/.graphify_semantic_new.json').read_text()) if Path('graphify-out/.graphify_semantic_new.json').exists() else {'nodes':[],'edges':[],'hyperedges':[]}
|
||||
saved = save_semantic_cache(new.get('nodes', []), new.get('edges', []), new.get('hyperedges', []))
|
||||
uncached = [line for line in Path('graphify-out/.graphify_uncached.txt').read_text().splitlines() if line]
|
||||
saved = save_semantic_cache(new.get('nodes', []), new.get('edges', []), new.get('hyperedges', []), allowed_source_files=uncached)
|
||||
print(f'Cached {saved} files')
|
||||
"
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user