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

Method GetByCacheKey

pkg/workflow/action_cache.go:383–391  ·  view source on GitHub ↗

GetByCacheKey retrieves a cached entry by its pre-computed key. This avoids recomputing the cache key when the caller has already computed it.

(key string)

Source from the content-addressed store, hash-verified

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.
383func (c *ActionCache) GetByCacheKey(key string) (string, bool) {
384 entry, exists := c.Entries[key]
385 if !exists {
386 actionCacheLog.Printf("Cache miss for key=%s", key)
387 return "", false
388 }
389 actionCacheLog.Printf("Cache hit for key=%s, sha=%s", key, entry.SHA)
390 return entry.SHA, true
391}
392
393// FindEntryBySHA finds a cache entry with the given repo and SHA
394// Returns the entry and true if found, or empty entry and false if not found

Callers 1

ResolveSHAMethod · 0.80

Calls 1

PrintfMethod · 0.45

Tested by

no test coverage detected