Use a smarter way to cache