diff --git a/cache_manager.py b/cache_manager.py index 51b8f8a..da94050 100644 --- a/cache_manager.py +++ b/cache_manager.py @@ -250,6 +250,14 @@ class L1CacheManager: if path and path.exists(): 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) entry = self.cache.find_by_content_hash(content_hash) if entry and entry.output_path.exists():