-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Description
Proposal Details
We have our own docker image containing our Go toolchain. As an optimization, we also pre-compile the standard library (go build std) so that it is in the gocache.
Evidently, the various Go tools will trim the cache upon exit. In particular, they will delete any files in the cache that have not been modified in the last five days. While this may be reasonable for a cache on someone's host machine, it does not make sense for a short-lived container using a cache from its image, since the mtimes will all reflect when the image was built. At best, it trimming the cache is pointless because the container will be destroyed shortly, and at worst is actively counterproductive as those cached files may be used by subsequent commands.
Please add an environment variable to disable trimming the gocache upon command exit. The specific name is immaterial, but something like GOCACHE_AUTO_TRIM=0 would be fine.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status