util/disk_cache: actually enforce cache size
authorAlan Swanson <reiver@improbability.net>
Mon, 6 Mar 2017 16:17:31 +0000 (16:17 +0000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Wed, 15 Mar 2017 00:15:11 +0000 (11:15 +1100)
commitf1e96714424f516ec3ee7a341fb10068340b0411
tree0b7d3db44aecc4ce9b50ad9a5ba746e39bc0d6ca
parentaf09b867329bcc5d50c22c2e634f5c5deb51e184
util/disk_cache: actually enforce cache size

Currently only a one in one out eviction so if at max_size and
cache files were to constantly increase in size then so would the
cache. Restrict to limit of 8 evictions per new cache entry.

V2: (Timothy Arceri) fix make check tests

Reviewed-by: Grazvydas Ignotas <notasas@gmail.com>
src/compiler/glsl/tests/cache_test.c
src/util/disk_cache.c