stash: make sure to write refreshed cache