Change datacache_get_iterator to use stack instead of heap