Only write build file times to cache after the build is complete.