Use cache and remove useless stream function