Added ability to cache results