Does Render persist Docker BuildKit --mount=type=cache caches between builds?

For some context, we’re would-be Heroku refugees and are strongly considering Render! We’ve become accustomed to Heroku’s abilities to cache artifacts between builds and are looking at potential equivalents as we move to Render and containerization.

I see that Render supports BuildKit’s secret mounts.

But what about BuildKit’s directory (not layer) cache mounting for build performance? Specifically, if we have --mount=type=cache directives in a Dockerfile, does this cache persist between builds?

https://github.com/moby/buildkit/blob/master/frontend/dockerfile/docs/syntax.md#run—mounttypecache

This type of directive can be a massive build time improvement when working with large package downloads, such as when doing:

RUN --mount=type=cache,target=/root/.cache/pip pip install -r requirements/production.txt

Has anything like this been implemented at Render?

Adding other links here since I’m limited as a new user:

Allow controlling cache mounts storage location · Issue #1512 · moby/buildkit · GitHub and specifically https://github.com/moby/buildkit/issues/1512#issuecomment-873055506 discuss challenges and potential solutions for addressing this in various CI/CD environments, but that issue may be a blocker.

Render uses Buildkit’s --import-cache and --export-cache behind the scenes to persist the cache between builds. Given that export and import --mount=type=cache caches · Issue #1474 · moby/buildkit · GitHub is closed with a link to #1512 which is open, this is unlikely to be supported right now.

We do have an open feature request for something very similar to what you’re describing: Canny. Please vote on it if it would satisfy your use case!