add test for result caching