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)
| 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. |
| 116 | func 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 |
| 124 | func parseCacheMemoryEntry(cacheMap map[string]any, defaultID string) (CacheMemoryEntry, error) { |
no outgoing calls
no test coverage detected