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

Function NewActionCache

pkg/workflow/action_cache.go:47–56  ·  view source on GitHub ↗

NewActionCache creates a new action cache instance

(repoRoot string)

Source from the content-addressed store, hash-verified

45
46// NewActionCache creates a new action cache instance
47func NewActionCache(repoRoot string) *ActionCache {
48 cachePath := filepath.Join(repoRoot, ".github", "aw", CacheFileName)
49 actionCacheLog.Printf("Creating action cache with path: %s", cachePath)
50 return &ActionCache{
51 Entries: make(map[string]ActionCacheEntry),
52 ContainerPins: make(map[string]ContainerPin),
53 path: cachePath,
54 // dirty is initialized to false (zero value)
55 }
56}
57
58// GetContainerPin returns the cached pin for the given image tag.
59// Returns the pin and true if a digest pin is present, otherwise empty pin and false.

Calls 1

PrintfMethod · 0.45