update cache even on ctrl-c