use cache to speed up first search