MCPcopy Create free account
hub / github.com/github/gh-aw / generateDefaultCacheKey

Function generateDefaultCacheKey

pkg/workflow/cache.go:116–121  ·  view source on GitHub ↗

generateDefaultCacheKey generates a default cache key for a given cache ID. Uses the legacy format (without integrity prefix) for backward compatibility when computing keys during initial entry parsing. The final key used in generated steps is produced by computeIntegrityCacheKey, which includes int

(cacheID string)

Source from the content-addressed store, hash-verified

114// computing keys during initial entry parsing. The final key used in generated steps
115// is produced by computeIntegrityCacheKey, which includes integrity level and policy hash.
116func generateDefaultCacheKey(cacheID string) string {
117 if cacheID == "default" {
118 return "memory-${{ env.GH_AW_WORKFLOW_ID_SANITIZED }}-${{ github.run_id }}"
119 }
120 return fmt.Sprintf("memory-%s-${{ env.GH_AW_WORKFLOW_ID_SANITIZED }}-${{ github.run_id }}", cacheID)
121}
122
123// parseCacheMemoryEntry parses a single cache-memory entry from a map
124func parseCacheMemoryEntry(cacheMap map[string]any, defaultID string) (CacheMemoryEntry, error) {

Callers 4

parseCacheMemoryEntryFunction · 0.85
parseCacheMemoryIdentityFunction · 0.85
computeIntegrityCacheKeyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected