Add tests for caching 2 types of menu affinitic refs #5749