How to block the automatic cleaning of Windows 10's Thumbnail Cache
Microsoft's Windows operating system uses a thumbnail cache for thumbnail icons used in Explorer to speed up the display of icons when a user opens a folder with cached items.
Microsoft changed how the thumbnail cache works in the Fall Creators Update for Windows 10. Starting with that release, Windows 10 clears the thumbnail cache automatically using a feature called Automatic Maintenance.
Automatic Maintenance
Automatic Maintenance performs a large number of tasks, from synchronizing the time and maintaining Windows Defender to defragmentation of drives and clean-up operations.
Tip: Open PowerShell and run the command Get-ScheduledTask | ? {$_.Settings.MaintenanceSettings} | Out-GridView to display all Automatic Maintenance tasks and the status of each in a listing.
One such task is called SilentCleanup. The task launches the built-in Disk Cleanup tool using the parameter /autoclean which makes the tool read Registry values to determine what to clean.
Cleaning the cache may free up storage on the device but it comes at the cost of having to renew the cache when File Explorer is used. Windows 10 users who keep lots of photos in a single folder may experience issues when those folders are opened in File Explorer as it may increase the CPU load for the time it takes to generate and cache the thumbnails.
You can visit the hidden folder %userprofile%\AppData\Local\Microsoft\Windows\Explorer in Explorer to display the cache.
Option 1: Making changes to the Registry
SilentCleanup checks the data of each Autorun Dword value under HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\ and HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\ to determine whether it should include that cache in the cleanup operation.
A value of 0 blocks the maintenance task from deleting the cache, a value of 1 allows it to to so.
Here is how you configure Windows 10 to block or allow the clearing of the cache:
- Open Start, e.g. by clicking on the icon or tapping on the Windows-key on the keyboard.
- Type regedit.exe.
- Confirm the UAC prompt that Windows displays.
- Go to HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Thumbnail Cache
- Double-click on the Autorun Dword value.
- Set it to 0 to prevent Windows from clearing the cache, or to 1 to allow it to do so.
- Go to HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Thumbnail Cache
- Double-click on the Autorun Dword value.
- Set it to 0 or 1 accordingly.
- Optional: repeat the steps for any other cache listed under VolumeCaches.
- Restart the PC.
Windows won't delete the cache anymore as part of Automatic Maintenance if you set both entries to 0.
Option 2: The Task Scheduler
You may disable the entire SilentCleanup task or even Automatic Maintenance in the Task Scheduler. Disabling SilentCleanup may be an option if you don't want Windows to clear the cache automatically.
You may still run Disk Cleanup or any third-party tool that supports the cleaning of Windows caches to do so. Note that used disk space my increase if you don't as Windows won't run the cleanup task anymore.
- Open Start.
- Type Task Scheduler and load the result. You may also search for taskschd.msc directly if Windows Search acts up and does not reveal the right result in the search results.
- Use the navigation in the sidebar to go to Task Scheduler Library > Microsoft > Windows > DiskCleanup
- Right-click on the SilentCleanup task on the right and select Disable from the context menu; this turns the task off so that it is not run automatically anymore.
Tip: You can turn the task back on at any time by following the steps described above and selecting Enable from the context menu.
… and it may also help to increase Max Icon Cache size. Default size is usually only 500MB and it can be increased to upwards of 4096. There’s plenty of articles regarding this.
Maybe you’d prefer to simply disable the entire SilentCleanup task all together? It’s located in Task Scheduler (type that into windows search). It’s listed under: Task Sheduler Library\Microsoft\Windows\DiskCleanup.
If you investigate this further (right-click the task, select Properties), you’ll be able to see that this task is actually set to run every time your computer is allowed to idle for 1 hour. That’s despite the description saying that the task is used “when running low on free disk space.” You’ll notice that the Last Run Time will reflect the last time you walked away from your computer for more than 1 hour, regardless of not being low on disk space.
As long as you’re okay with being responsible for your own disk cleanup (a lot of computer savvy people would prefer this anyway), then you’ll be okay to disable this task. You can still clean all that stuff manually by using Disk Cleanup (right-click C: and choose Properties).
The fact is, all that task does is activate “Disk Cleanup”, and trigger it to run silent so that you wont see it run. When you run it manually, you’re able to select the areas you want cleaned.
This doesn’t work.
Set both registry values to 0 and disabled the task, thumbnails still get recreated.
Stupid Windows.
What’s the point of having thumbnail cache if you still delete it regularly and make the user sit there and wait for it to load?
I frequently have in User/Name/Appdata/Local/Temp/ a number of folders with long numerical names. All those folders contain the same bunch of files of which the main is DISMHOST.exe.
When looking for the phenomenon this is a very long running complaint, some people have hundreds or even thousands of those folders, filling their HDD or SSD.
I suspect that running SilentCleanUp is the culprit, at my PC this task is often interrupted (according to the TaskScheduler).
Then the temporally folder with DISMHOST+files is not automatically deleted as at normally ending SilentCleanUp.
If you are not aware of this, and when SilentCleanUp is often interrupted (because of me unknown couse), the folder-filling of your HDD or SSD continues.
If you regularly run a CleanUp utility (e.g. Eusing Cleaner) then the amount of those folders stays limited.
I have now stopped the task of SilentCleanUp, and keeping an eye if this solution works.
On internet I found only 1 working solution to stop this numerical-folder filling of the HDD or SSD, use the MediaCreationTool-program to upgrade/update your Windows-OS (despite that your OS is fully actual).
I wonder if stopping the SilentCleanUp-task has other/negative consequences ?
Mine is “blocked” with the notice : “The Operator or Administrator has refused the request (0x800710E0)
:-)
Do the automatic disk cleanup and disk defrag under Task Scheduler happen while the disk is still in use or running, eg while the users are still surfing the web.? If so, won’t this Automatic Maintenance feature cause program conflicts and computer problems.?
Martin ( Or anybody else who know’s) do you have roughly speaking any idea when you have a large number of pictures ( Let see 100.000) how large the thumbnail cache will become?
And does not cleaning also have possible have side effects like possible running out of cache room?
You can look in “C:\Users\Username\AppData\Local\Microsoft\Windows\Explorer”
I’ve got over 15,000 media files that have thumbnails and the entire ‘Explorer’ folder in the path above is 795mb. I’m using the “large icons” size.
For photos I use an old version of ACDSee. It does not store thumbnails so those are not included.
Never seen it bigger than 500-600 MB. I don’t know if I had 100 000 pictures worth of thumbnails, but tens of thousands, definitely.
I just open WinAero Tweaker and check the box next to “Keep Thumbnail Cache”.
+1