buildgrid.server.cas.tree_cache.in_memory module

class buildgrid.server.cas.tree_cache.in_memory.InMemoryTreeCache(storage: StorageABC, size: int, ttl_minutes: float = 60)

Bases: TreeCache

put(root_digest: Digest, root: Directory, children: Iterable[Directory]) None

Store a tree under its root digest.

get(root_digest: Digest) Tree | None

Retrieve a cached Tree by root digest, or None on miss.