Use the same query when testing for cached values

The original test wasn't using the same query, and so wasn't actually
testing if values were being cached
Revert "Use the same query when testing for cached values"

This reverts commit 56b2f3cba4a793ad62ff241d0a866510e2d68baa.