Share via


SharePoint 2010 | Clear SharePoint Cache

SharePoint caches the content (Could be images, etc.) in two of its system folders.

The cache is composed of these 2 folders:

  • %APPDATA%\Microsoft\Web Server Extensions\Cache
  • %USERPROFILE%\AppData\Local\Microsoft\WebsiteCache

In order to clear the cache, simply delete the files in these two folders.

I even created a batch file for doing this, which allows you to automate this function either as a scheduled job or manually by clicking on the batch file.

========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”

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

Comments

  • Anonymous
    January 28, 2012
    What kind of cache is it? I know about BLOB cache. Is it Site Output Cache? Best Hélio Sá Moreira

  • Anonymous
    September 13, 2012
    Is there a way to set the config such that these files would get deleted from the client? Thanks.

  • Anonymous
    December 18, 2013
    Are these 2 cache files on the SharePoint server?