buildgrid.server.cas.tree_cache.tree_cache module

class buildgrid.server.cas.tree_cache.tree_cache.TreeCache(storage: StorageABC)

Bases: ABC

Abstract cache mapping root digests to their full Tree messages.

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

Store a tree under its root digest.

abstract get(root_digest: Digest) Tree | None

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