Stop Windows 10 From Automatically Deleting the Thumbnail Cache is a registry hack to automate the process explained here of making two registry changes, so Windows 10 no longer deletes your thumbnail cache.
If this problem only happens to you occasionally, you might consider rebuilding your icon cache. There are a few steps involved but no system changes are required, and no registry editing is needed. This script is for those who find that their thumbnail cache is repeatedly being deleted, especially for those with a lot of photos since rebuilding the thumbnail icon cache in those cases can be time-consuming and waste system resources when you least expect it.
We prefer that if you're annoyed by Windows 10 deleting your thumbnail cache that you do the registry edit again, that we explained here.
It's simple to do, but this script is for those not familiar, or not wanting to edit the registry.