update the cache