misc: small refactoring for test_cache_lru