After learning to clean the sharepoint cache hardway, I have come up with basic commands, that would help all of who needs to get this done in easier way, below is the script, you can cut and paste it on to a notepad, save the file as clearSPCache.bat file and place it on the sharepoint server, when you execute the file, it will clean the sharepoint cache for you with one click. (assuming your sharepoint is installed in default locations as per microsoft)

========Script Start below===================

cd “%APPDATA%\Microsoft\Web Server Extensions\Cache”

del *.web /S /Q “%APPDATA%\Microsoft\Web Server Extensions\Cache”

cd “%USERPROFILE%\AppData\Local\Microsoft\WebsiteCache\”

rmdir /S /Q “%USERPROFILE%\AppData\Local\Microsoft\WebsiteCache\.”

mkdir “%USERPROFILE%\AppData\Local\Microsoft\WebsiteCache”

dir “%APPDATA%\Microsoft\Web Server Extensions\Cache”
dir “%USERPROFILE%\AppData\Local\Microsoft\WebsiteCache”

pause

========Script End========================

Please do let me know, if this script has helped you

Advertisements