gencache: Prune expired entries
commit608df97d5dbc4e56456b83a28e3b2251a9aa4007
authorVolker Lendecke <vl@samba.org>
Wed, 24 Oct 2018 08:51:40 +0000 (24 10:51 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 6 Nov 2018 17:57:26 +0000 (6 18:57 +0100)
tree6b3d71c6f9c4c90ce80150d7df9740635288d59e
parentc13eb55253a00d9472c749ccf58dd13e0efd1518
gencache: Prune expired entries

This solves the problem that gencache never shrinks right
now. Whenever we write an entry, we now walk that entry's chain and
delete expired entries. This should be a good balance between
performance and cleanup actions: Reading is still unaffected, and
those who write pay a small penalty while keeping gencache size under
control.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/lib/gencache.c