util/disk_cache: separate file reads from cache item validation
authorTimothy Arceri <tarceri@itsqueeze.com>
Wed, 3 Mar 2021 04:12:09 +0000 (15:12 +1100)
committerMarge Bot <eric+marge@anholt.net>
Tue, 16 Mar 2021 23:37:47 +0000 (23:37 +0000)
commit16b2b4342b5d561e0c56c47c4fffed22cfe1721c
tree78d9a520a3ebfce7a93fc6eb0e7ba6dcfa669f11
parent9cf0aac13097807dca468735fe84eba111b0fb9d
util/disk_cache: separate file reads from cache item validation

This will allow us to share validation between the single file cache
and the multifile cache.

It also reduces the number of malloc() calls.

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