First commit

This commit is contained in:
2026-06-19 22:17:09 -03:00
commit 239203ee2a
533 changed files with 75195 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
import pytest
from agent_framework.cache.cache import DistributedCache, InMemoryCache
@pytest.mark.asyncio
async def test_distributed_cache_populates_l1_from_l2():
l1 = InMemoryCache(); l2 = InMemoryCache()
await l2.set("k", {"v": 1})
cache = DistributedCache(l1, l2)
assert await cache.get("k") == {"v": 1}
await l2.delete("k")
assert await cache.get("k") == {"v": 1}