Fix issue #9332, add bytesDone for cache files