Implementation:Kubeflow Pipelines Cache Key Protobuf
| Knowledge Sources | |
|---|---|
| Domains | Pipeline_Caching, API_Schema |
| Last Updated | 2026-02-13 14:00 GMT |
Overview
Auto-generated Go protobuf bindings defining the cache key schema used to compute deterministic cache fingerprints for KFP pipeline steps.
Description
The cache_key.pb.go file contains Go struct types generated by `protoc-gen-go` (v1.36.6) from `cache_key.proto`. It defines the data structures used to compute cache keys for pipeline task outputs, enabling the caching subsystem to determine whether a step has been previously executed with identical inputs. The file contains 8 message types and no enums or services.
Usage
This file is imported by the KFP backend cache server to serialize and compare cache key structures. It is not directly used by end users but is essential for the pipeline caching mechanism.
Code Reference
Source Location
- Repository: Kubeflow_Pipelines
- File: api/v2alpha1/go/cachekey/cache_key.pb.go
- Lines: 1-330
Signature
package cachekey
// CacheKey represents the deterministic fingerprint for a pipeline task.
// Contains 8 message types for cache key computation.
// Generated from cache_key.proto by protoc-gen-go v1.36.6.
Import
import "github.com/kubeflow/pipelines/api/v2alpha1/go/cachekey"
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| Proto descriptor | []byte | Yes | Raw protobuf descriptor bytes for cache_key.proto |
Outputs
| Name | Type | Description |
|---|---|---|
| Go types | structs | 8 generated message types for cache key computation |
| File descriptor | protoreflect.FileDescriptor | Protobuf file reflection descriptor |
Usage Examples
Accessing Cache Key Types
package main
import (
"github.com/kubeflow/pipelines/api/v2alpha1/go/cachekey"
"google.golang.org/protobuf/proto"
)
// Create and serialize a cache key for comparison
func computeCacheKey(taskSpec []byte) ([]byte, error) {
key := &cachekey.CacheKey{
// Populate fields from task specification
}
return proto.Marshal(key)
}