Overview
The Action Cache maps action digests to their execution results, including:- Exit code
- stdout/stderr
- Output file digests
- Execution metadata
- Action result caching
- Read-only mode support
- Automatic result validation
Configuration
The instance name identifying this AC endpoint
Reference to the store configured in the
stores sectionIf true, only GetActionResult is allowed (no updates)
gRPC Methods
GetActionResult
Retrieve a cached action result. Request:The instance name
Digest of the Action message
Include stdout inline if small enough
Include stderr inline if small enough
Paths of output files to include inline
Process exit code
Digest of stdout (if not inlined)
Inline stdout (if requested and small)
Digest of stderr (if not inlined)
Inline stderr (if requested and small)
Output files produced by the action
Output directories produced by the action
Metadata about the execution (worker, timing, etc.)
UpdateActionResult
Store an action result in the cache. Request:The instance name
Digest of the Action message
The result to cache
Caching policy (priority, etc.)
The stored action result (echoed back)
Cache Key Structure
The action digest serves as the cache key and is computed from:- Command line arguments
- Environment variables
- Input file digests
- Platform properties
The action digest must be deterministic - same inputs always produce the same digest
Implementation Details
Fromnativelink-service/src/ac_server.rs:
Error Codes
| Code | Description |
|---|---|
NOT_FOUND | Action result not in cache |
INVALID_ARGUMENT | Invalid action digest or instance name |
PERMISSION_DENIED | Update attempted on read-only AC |
INTERNAL | Storage backend error |
The AC service follows the Remote Execution API v2 specification