Caching update feature not reliable

Hi there.
We are using the caching feature for our created /dist folder:

cache:
  directories:
    - node_modules
    - dist

But if a new build run is triggered and some files are changed the update is missed for the last update. That isn’t just a output rendering issue. The tests are passing locally bug not on Travis and removing the caching directory /dist solved the issue. Here i the Travis log where you clearly can see that the last file seems broken:

https://travis-ci.com/Alfresco/alfresco-content-app/jobs/201751234#L629

it should be app.config.json and not app.config.jso

As well I checked other builds from our repositories where the same happens. The last file name gets cut.

We truncate the log output at 1000 characters.

This is not the last file in the cache.