Support for build-and-run-time dependencies

I just tried it and the caching does indeed seem to work in my use case.