use cache to speed up