I’ve tested @tanzislam’s idea with a fork of @bkimminich’s repo.
Here’s the “happy” build: https://staging.travis-ci.org/BanzaiMan/juice-shop/builds/747916.
Compared to the previous build https://staging.travis-ci.org/BanzaiMan/juice-shop/builds/747914 (which created the cache), the build time is 2 minutes shorter.
With the production code with no tinkering with Windows Defender, https://staging.travis-ci.org/BanzaiMan/juice-shop/builds/747918 fails to expand the cache.
See