Randy Fay
Randy Fay
The ddev composer cache is stored in /mnt/ddev-global-cache/composer/, which is the "composer" directory in the `ddev-global-cache` docker volume. So you'd have to extract it from the docker volume and save...
I don't recommend restoring directly to a volume in any docker environment, but it might work.
We should probably figure out how to get npm's cache somewhere else, as ~/.npm is lost on every restart. It could also be copied with the `docker cp` approach, but...
I was interested in figuring out how to cache npm and yarn cache, but there doesn't seem to be an obvious way in either case. There doesn't seem to be...
It doesn't directly help you with this specific problem but the caches will move and be persisted in v1.20.0: * https://github.com/drud/ddev/pull/4051
There are awkward ways to do it (running a container with volume mounted ahead of time and prepopulating) but the best way would be to just keep a running cache...
It's docker volume, not container, and I think for predictable, supported docker behavior you'd have to copy it out of volume before caching, and copy it in after cache restore.
You can just do that with a .env file if it's what you want.
It sure would help. CircleCI provides that capability. I'll bet Github has something up their sleeves now or later. I should note though that having watched this a lot of...
A search does show some possibilities. * https://github.com/marketplace/actions/docker-layer-caching