Add caching of partial results