Fix cache method name: get_content_path -> get_by_content_hash
The L1CacheManager uses get_by_content_hash not get_content_path. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -97,7 +97,7 @@ class CacheService:
|
||||
if not self.cache.has_content(content_hash):
|
||||
return None
|
||||
|
||||
path = self.cache.get_content_path(content_hash)
|
||||
path = self.cache.get_by_content_hash(content_hash)
|
||||
if not path or not path.exists():
|
||||
return None
|
||||
|
||||
@@ -193,7 +193,7 @@ class CacheService:
|
||||
if not self.cache.has_content(content_hash):
|
||||
return None, None, None
|
||||
|
||||
path = self.cache.get_content_path(content_hash)
|
||||
path = self.cache.get_by_content_hash(content_hash)
|
||||
if not path or not path.exists():
|
||||
return None, None, None
|
||||
|
||||
@@ -231,7 +231,7 @@ class CacheService:
|
||||
if not self.cache.has_content(content_hash):
|
||||
return None, f"Content {content_hash} not in cache"
|
||||
|
||||
path = self.cache.get_content_path(content_hash)
|
||||
path = self.cache.get_by_content_hash(content_hash)
|
||||
if not path or not path.exists():
|
||||
return None, f"Content {content_hash} not in cache"
|
||||
|
||||
@@ -354,7 +354,7 @@ class CacheService:
|
||||
"content_hash": content_hash,
|
||||
"ipfs_cid": ipfs_cid,
|
||||
"asset_name": meta.get("title") or content_hash[:16],
|
||||
"asset_type": detect_media_type(self.cache.get_content_path(content_hash)),
|
||||
"asset_type": detect_media_type(self.cache.get_by_content_hash(content_hash)),
|
||||
"origin": origin,
|
||||
"description": meta.get("description"),
|
||||
"tags": meta.get("tags", []),
|
||||
@@ -378,7 +378,7 @@ class CacheService:
|
||||
actor_id=actor_id,
|
||||
l2_server=l2_server,
|
||||
asset_name=meta.get("title") or content_hash[:16],
|
||||
content_type=detect_media_type(self.cache.get_content_path(content_hash))
|
||||
content_type=detect_media_type(self.cache.get_by_content_hash(content_hash))
|
||||
)
|
||||
await self.db.update_item_metadata(
|
||||
content_hash=content_hash,
|
||||
|
||||
Reference in New Issue
Block a user