Faster method to cache result