This commit is contained in:
Simone Scarduzio
2025-10-10 10:09:11 +02:00
parent ac7d4e067f
commit 04cc984d4a
2 changed files with 2 additions and 4 deletions

View File

@@ -70,7 +70,7 @@ class ContentAddressedCache(CachePort):
raise ValueError(f"Invalid SHA256: {sha256}")
# Two-level directory structure
l1_dir = sha256[:2] # First 2 chars
l1_dir = sha256[:2] # First 2 chars
l2_dir = sha256[2:4] # Next 2 chars
return self.base_dir / l1_dir / l2_dir / sha256

View File

@@ -44,9 +44,7 @@ class TestMemoryCache:
memory_cache.write_ref("test-bucket", "test-prefix", test_file)
# Read back
retrieved_path = memory_cache.get_validated_ref(
"test-bucket", "test-prefix", expected_sha
)
retrieved_path = memory_cache.get_validated_ref("test-bucket", "test-prefix", expected_sha)
# Verify content
assert retrieved_path.read_bytes() == test_content