I open 13 instances of Google Chrome every 30 minutes. After 30 minutes they are getting closed by killing the Chromedriver task through .bat file:
taskkill /F /IM chromedriver.exe /T
And after that I open them again.
Lately, on Chrome version 110 they changed the cache folder from
C:\Users\User\AppData\Local\Temp\*
to:
C:\Program Files (x86)
Every 5 hours there is a lot of cache gathering. In the older version, when the Temp folder was the default, I ran .bat file to delete everything there:
del /Q /S C:\Users\User\AppData\Local\Temp\*
Now, that the Program files is the default, I'm using 'shutil' python library script to delete the specific cache folders:
base_path = r"C:\Program Files (x86)"
dir_list = glob.iglob(os.path.join(base_path, "scoped_dir*"))
for path in dir_list:
if os.path.isdir(path):
print(path)
shutil.rmtree(path, ignore_errors=True)
I have this code on 3 different computers and something really odd is happening. Since this method of deleting the cache files, all my computers are taking something around 40 minutes (really, 40 minutes, not joking) to log in to my windows user (After I'm entering the password to my user after restarting my compter).
Maybe when I deleted the cache with "del /Q /S" there is any registry that collecting on my computer and every Windows startup is taking so long because of that?
Someone can help?