Skip to content

util: Allow multiple RO single-file caches with a RW multiple-file cache

Arnaud Ferraris requested to merge a-wai/mesa:multi-cache into main

Currently, the cache system allows for one of the following options:

  1. one RW single-file cache without size cap + multiple read-only single-file caches, or
  2. one RW multiple-file cache with optional size cap.

Being able to provide pre-generated (read-only) cache files, while still enforcing a maximum size for the read-write part of the cache, can be a useful third option.

This patch aims at implementing such a "hybrid" behavior, by allowing the use of the MESA_DISK_CACHE_READ_ONLY_FOZ_DBS environment variable even when MESA_DISK_CACHE_SINGLE_FILE is not set.

Signed-off-by: Arnaud Ferraris arnaud.ferraris@collabora.com

Edited by Tomeu Vizoso

Merge request reports