cacheIntegrityLevel returns the integrity level string for cache key generation. Returns defaultCacheIntegrityLevel when no guard policy is configured.
(github *GitHubToolConfig)
| 164 | // cacheIntegrityLevel returns the integrity level string for cache key generation. |
| 165 | // Returns defaultCacheIntegrityLevel when no guard policy is configured. |
| 166 | func cacheIntegrityLevel(github *GitHubToolConfig) string { |
| 167 | if github == nil || github.MinIntegrity == "" { |
| 168 | return defaultCacheIntegrityLevel |
| 169 | } |
| 170 | return string(github.MinIntegrity) |
| 171 | } |
| 172 | |
| 173 | // computeIntegrityCacheKey returns the effective cache key for a cache entry, incorporating |
| 174 | // the integrity level and policy hash prefix. The key always starts with |
no outgoing calls