Cache seeding: moved beginSeedingCache() into a named function, for easier debugging