DeleteContainerPin removes the pin for the given image tag. It is a no-op if the image has no cached pin.
(image string)
| 89 | // DeleteContainerPin removes the pin for the given image tag. |
| 90 | // It is a no-op if the image has no cached pin. |
| 91 | func (c *ActionCache) DeleteContainerPin(image string) { |
| 92 | if c.ContainerPins == nil { |
| 93 | return |
| 94 | } |
| 95 | if _, exists := c.ContainerPins[image]; exists { |
| 96 | delete(c.ContainerPins, image) |
| 97 | c.dirty = true |
| 98 | actionCacheLog.Printf("Deleted container pin for image=%s", image) |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | // PruneOrphanedEntries removes action cache entries whose keys are not present |
| 103 | // in referencedKeys. It returns the number of entries that were removed. |