New cachedInstancesWhere method, using a basic invalidate-on-write query cache.