Improved keys-only query test cache tests.