Fix infinite recursion in get_by_cid

Remove self-recursive call that caused infinite loop when looking up IPFS CIDs.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
gilesb
2026-01-12 08:43:06 +00:00
parent b35fe3d7a7
commit f333eeb1e6

View File

@@ -428,10 +428,6 @@ class L1CacheManager:
def get_by_cid(self, cid: str) -> Optional[Path]: def get_by_cid(self, cid: str) -> Optional[Path]:
"""Get cached file path by cid or IPFS CID. Falls back to IPFS if not in local cache.""" """Get cached file path by cid or IPFS CID. Falls back to IPFS if not in local cache."""
# If it looks like an IPFS CID, use get_by_cid instead
if self._is_ipfs_cid(cid):
return self.get_by_cid(cid)
# Check index first (Redis then local) # Check index first (Redis then local)
node_id = self._get_content_index(cid) node_id = self._get_content_index(cid)
if node_id: if node_id: