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 (3)
  1. Hélio Sá Moreira says:

    What kind of cache is it?

    I know about BLOB cache. Is it Site Output Cache?


    Hélio Sá Moreira

  2. Tina says:

    Is there a way to set the config such that these files would get deleted from the client? Thanks.

  3. NE says:

    Are these 2 cache files on the SharePoint server?

Comments are closed.

Skip to main content