NewActionCache creates a new action cache instance
(repoRoot string)
| 45 | |
| 46 | // NewActionCache creates a new action cache instance |
| 47 | func 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. |