util/disk_cache: detangle cache item creation from disk writing
authorTimothy Arceri <tarceri@itsqueeze.com>
Sat, 6 Mar 2021 02:35:07 +0000 (13:35 +1100)
committerMarge Bot <eric+marge@anholt.net>
Tue, 16 Mar 2021 23:37:47 +0000 (23:37 +0000)
commitba324bff1ca19cf2ba196707e4cb6d4817879672
tree16b994793eb3ffddf01eb989e7edfc0521894479
parent16b2b4342b5d561e0c56c47c4fffed22cfe1721c
util/disk_cache: detangle cache item creation from disk writing

This refactors the cache code so that we create the full cache
item in memory before writing it to disk. The result is slightly
cleaner code and the ability to share this code between the single
and multi file cache implementations.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9443>
src/util/disk_cache_os.c