#Help with caching
1 messages · Page 1 of 1 (latest)
Checking with ls is seems that the cache gets its data in after optimizing, but on the next run, the cache is empty
The cache key is the same every time, coming from a const
This is how I create the caches.
caches := map[string]*dagger.CacheVolume{
config.NpmCacheDir: dag.Client.CacheVolume(config.GlobalNpmCacheKey),
config.ElectronCacheDir: dag.Client.CacheVolume(config.GlobalElectronCacheKey),
config.PreCommitCacheDir: dag.Client.CacheVolume(config.GlobalPreCommitCacheKey),
config.ImageCacheDir: dag.Client.CacheVolume(config.GlobalImageCacheKey),
}
cacheOpts := dagger.ContainerWithMountedCacheOpts{Sharing: dagger.Shared}
for k, v := range caches {
c = c.WithMountedCache(k, v, cacheOpts)
}
Hmm locally runs fine, but not on the jenkins agent
How I would check if the buildkit flushes the cache for some reason
Actually on jenkins nothing seems to be cached.
Re-running the same job, it takes the full time