Hi, @yangci, and welcome to our Netlify community site.
There is a cache directory the build system uses at Netlify to speed up the site build when possible. This is a cache of the various things which include for example the
node_modules directory and the repo itself for the site. This makes the next checkout of the repo and the updating of the node dependencies faster in most cases.
However, sometimes changes occur to these directory between builds which cause builds to fail when the cached version is used. This button (“Clear cache and deploy site”) causes that cache directory to be deleted so a fresh
git clone and
npm install occur without loading the cached version.
Regarding the preview image, this isn’t related to that button. The preview should update whenever there is a successful build of a site.
There was a time where the preview wasn’t updating at all. So sites without a recent build may not have a preview (if they were last built when this preview wasn’t working).
If there are other questions, please let us know.