I generally avoid `File.createTempFile` since it becomes source of randomness, and randomness messes with caching.
You should be able to create normal files under `cacheDir` with `.tmp` extension and it shouldn't conflict, since other files are named using hash. Just delete it beforehand if it exists.