Clear Cache in Chrome - Powershell or Cmd Prompt

Gurus,
I have a process that runs for a bit and unfortunately I see chrome crashing with “Aw Snap”.

In order to overcome this issue I am trying to clear the cache periodically via a Powershell or cmd line. I don’t want to use the screen so it appears seamless to the end user. I tried to use the link below with little luck Clear Cache in Chrome

Any guidance would be much appreciated.

Thanks,
Kaushik

Below PowerShell script should work.
It deletes the contents of the Cache folder in %LocalAppData%\Google\Chrome\User Data\Default\Cache
Please note, this will kill chrome first.

taskkill /F /IM "chrome.exe"
Start-Sleep -Seconds 5
$Items = @('Archived History',
            'Cache\*',
            'Cookies',
            'History',
            'Login Data',
            'Top Sites',
            'Visited Links',
            'Web Data')
$Folder = "$($env:LOCALAPPDATA)\Google\Chrome\User Data\Default"
$Items | % { 
    if (Test-Path "$Folder\$_") {
        Remove-Item "$Folder\$_" 
    }
}

@KannanSuresh,
Thank you.

I will try and keep you posted

this one looks fancy and does for more browser in case you ever need…
https://community.spiceworks.com/scripts/show/4191-powershell-cache-clearing-script