I’m not familiar with ccache so the following solution may not work for you.
You could use s3 storage with drone-s3-cache plugin to allow caching across agents that isn’t dependent on mounted storage. It basically will create a tarball of files you want to save to use later and store it in s3 storage. Then subsequent build can pull/expand the tarball with the “cached” files.
If you don’t have access to s3 storage you can host your own with a minio server.
also note that I believe google cloud storage is compatible with the S3 protocol, so you should be able to use the drone-s3-cache plugin. But if not, a drone-gcs-cache-plugin would be a welcome addition.
@kobigurk in this case, you should still be able to create a google cloud storage mount on your agent instances. I am not sure exactly what is required to create the mount, but I’m guessing it can be done by overriding the default cloud-init file used by the autoscaler to configure instances.
Note that overriding the cloud-init file is an advanced feature of the autoscaler. It is not documented yet, but I did write up some notes for someone using a custom cloud-init with amazon that you can use as reference for gcp: https://notehub.org/kx2kf