]> git.ipfire.org Git - thirdparty/FORT-validator.git/commit
Cache cleanup review
authorAlberto Leiva Popper <ydahhrk@gmail.com>
Thu, 14 Nov 2024 19:54:14 +0000 (13:54 -0600)
committerAlberto Leiva Popper <ydahhrk@gmail.com>
Thu, 14 Nov 2024 19:54:14 +0000 (13:54 -0600)
commit7711a247beb1119ee1349e9ddc0d13cd6ab08917
treeb61655eb05f71ecf1004310ad0f35ed7ebc3be46
parentc72177ada4b8ecdad26583fba0a04f3246c0d440
Cache cleanup review

Fixes several XXXs.

- Separate node->mtim into attempt_ts and success_ts.
  Because they're really two different timestamps; The former is meant
  for node expiration, the latter for HTTP IMS.
- Move removal of orphaned fallbacks to remove_abandoned().
  Because orphaned refreshes need the same logic.
- Added the (randomly missing) expiration threshold for orphans.

It's still missing the implementation of remove_orphaned_files(),
but I'm still weighting options, as it seems it's going to be an
expensive operation that's rarely going to do anything.
src/cache.c
src/file.c
src/file.h
test/cache_test.c
test/mock.c