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

Method Get

pkg/workflow/action_cache.go:369–379  ·  view source on GitHub ↗

Get retrieves a cached entry if it exists

(repo, version string)

Source from the content-addressed store, hash-verified

367
368// Get retrieves a cached entry if it exists
369func (c *ActionCache) Get(repo, version string) (string, bool) {
370 key := formatActionCacheKey(repo, version)
371 entry, exists := c.Entries[key]
372 if !exists {
373 actionCacheLog.Printf("Cache miss for key=%s", key)
374 return "", false
375 }
376
377 actionCacheLog.Printf("Cache hit for key=%s, sha=%s", key, entry.SHA)
378 return entry.SHA, true
379}
380
381// GetByCacheKey retrieves a cached entry by its pre-computed key.
382// This avoids recomputing the cache key when the caller has already computed it.

Calls 2

formatActionCacheKeyFunction · 0.85
PrintfMethod · 0.45