Implemented caching for queries of datafiles within datasets