Can cache mounts be excluded from docker system prune?

We have some --mount=type=cache mounts for our local builds which will take ages to regenerate if they are pruned.

Can cache mounts in general (or specific ones) be excluded from docker system prune? Surprisingly it seems that this prunes cached mounts.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.