update and add cache