from cachetory import serializers
from cachetory.backends import async_ as async_backends
from cachetory.caches.async_ import Cache
cache = Cache[int, bytes](
serializer=serializers.from_url("pickle://?pickle-protocol=4"),
backend=async_backends.from_url("redis://localhost:6379"),
)
async def main() -> None:
await cache.set("foo", 42)
assert await cache.get("foo") == 42
-
Notifications
You must be signed in to change notification settings - Fork 6
Caching library with support for multiple cache backends
License
kpn/cachetory
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Caching library with support for multiple cache backends