Astro build cache not saving/restoring

Hi hi hello :)

I host a personal image gallery built with Astro on Pages, which naturally contains a bunch of images that get optimized into a few different variants during the build stage, using the built-in
getImage
utility. Astro caches these files in the
node_modules/.astro/assets
directory so subsequent builds don't need to re-optimize everything from scratch.

Pages is supposed to upload and restore the
node_modules/.astro
directory as long as build caching is enabled, you're using v2, etc. and also if it detects "astro" as a dependency (or something like that). However, in my case, it is not doing this, resulting in build times of ~17 minutes every time.

There is another ticket from late last year about this problem but it seems to be a separate issue: build-caching-betaAstro build caching
Was this page helpful?