Back in the Amiga days we had a RAM disk. It was perfect for storing all kinds of temporary files as it was extremely fast and would be cleared every time the system rebooted. Windows doesn’t have anything like that.
I found a way to make something similar. I use a temporary folder on a hard drive. It’s not as fast as RAM but it is cleared on reboot by having the following script run at shutdown:
rmdir /S /Q g:\temp
mkdir g:\temp
Basically delete the directory recursively and re-create it. Simple but effective. You can assign a drive letter to the directory too.