You can bodge your own solution if you use your own build agent.
For hosted build agents, this is about to change, as a new caching task is in preview. I've tried it, and it's unstable at the moment, so I'd recommend just waiting until it's out of preview.
https://developercommunity.visualstudio.com/content/idea/365...
F.S. I work for Codefresh a CI/CD solution