buildgrid.server.actioncache.caches.s3_cache module

S3 Action Cache

Implements an Action Cache using S3 to store cache entries.

class buildgrid.server.actioncache.caches.s3_cache.S3ActionCache(storage:, allow_updates: bool = True, cache_failed_actions: bool = True, bucket: Optional[str] = None, endpoint: Optional[str] = None, access_key: Optional[str] = None, secret_key: Optional[str] = None)

Bases: buildgrid.server.actioncache.caches.action_cache_abc.ActionCacheABC

property allow_updates
get_action_result(action_digest: build.bazel.remote.execution.v2.remote_execution_pb2.Digest) → build.bazel.remote.execution.v2.remote_execution_pb2.ActionResult

Retrieves the cached ActionResult for the given Action digest.


action_digest – The digest to get the result for


The cached ActionResult matching the given key or raises NotFoundError.

update_action_result(action_digest: build.bazel.remote.execution.v2.remote_execution_pb2.Digest, action_result: build.bazel.remote.execution.v2.remote_execution_pb2.ActionResult) → None

Stores the result in cache for the given key.

  • action_digest (Digest) – digest of Action to update

  • action_result (Digest) – digest of ActionResult to store.