Fix cache lookup to work across processes
cache_manager.py: - get_by_content_hash() now tries direct cache.get(content_hash) since uploads use content_hash as node_id - This works even if cache index hasn't been reloaded Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -250,6 +250,14 @@ class L1CacheManager:
|
|||||||
if path and path.exists():
|
if path and path.exists():
|
||||||
return path
|
return path
|
||||||
|
|
||||||
|
# For uploads, node_id == content_hash, so try direct lookup
|
||||||
|
# This works even if cache index hasn't been reloaded
|
||||||
|
path = self.cache.get(content_hash)
|
||||||
|
if path and path.exists():
|
||||||
|
self._content_index[content_hash] = content_hash
|
||||||
|
self._save_content_index()
|
||||||
|
return path
|
||||||
|
|
||||||
# Scan cache entries (fallback for new structure)
|
# Scan cache entries (fallback for new structure)
|
||||||
entry = self.cache.find_by_content_hash(content_hash)
|
entry = self.cache.find_by_content_hash(content_hash)
|
||||||
if entry and entry.output_path.exists():
|
if entry and entry.output_path.exists():
|
||||||
|
|||||||
Reference in New Issue
Block a user