Multi-stage docker build, can I cache dependencies?

Hi there,

I’ve created a pipeline in that builds a docker image using the docker-image-resource. It is a multi-stage build of a maven project and so I don’t have any tasks defined, only a put which does the docker build.

The build is taking some time downloading dependencies which could be cached. I can see that it is possible to cache if you define a task, but cannot see whether or not it is possible to cache during a put.

Any help would be appreciated