Re-add cache funtionality