The advice to “clear cache” gets thrown around in SharePoint like its Peruvian Cocaine that’ll make all your (SharePoint) worries go away. It’s true… well, it’s mostly true. Anyway, let’s clear some air around the SharePoint configuration cache – what it is, how to clear it, and what not to do?
- What is SharePoint Configuration Cache?
The cache has many names – system cache, SharePoint cache, configuration cache, the cache, that folder with XML files,… you get the drift. It really is a cache of farm’s configuration objects. There is a timer job called “Config Refresh” that updates the cache on SharePoint servers in the farm. Like any other cache, config cache becomes stale over time. Therefore, clearing the cache is needed to get all the SharePoint servers up to date on the latest farm information.
- How to clear SharePoint Configuration Cache?
a) Stop the SharePoint 2010 Timer service on ALL of SharePoint servers in the farm.
b) Log into your Index server.
c) Navigate to the directory: C:\ProgramData\Microsoft\SharePoint\Config\GUID.
d) Delete all the XML files from the directory.
CAUTION: DELETE ONLY THE .XML FILES, NOT THE .INI FILE. IF YOU DELETED THE .INI file, see item 3.
e) Open the cache.ini with Notepad and reset the number to 1. Save and close the file.
f) Start the SharePoint 2010 Timer service on the Index server and wait for XML files to reappear in the directory.
g) After you see XML files appearing, repeat steps c, d & e on each query server (one server at a time).
h) After all of the query servers have all been cleared, repeat steps c, d & e on each of the WFE and application servers in the farm (one server at a time).
- I deleted the entire configuration cache directory. Now What?
a) To recreate the directory, you need to know the directory name (which is a GUID). You can find this GUID in the registry entry: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\14\Secure\ConfigDB. Copy the GUID from Id attribute and create the new directory: C:\ProgramData\Microsoft\SharePoint\Config\GUID.
b) In the directory you just created, create another file called cache.INI. Open the file using Notepad and enter the number “1″ without the quotes. Save and close the file.
c) Start the SharePoint 2010 Timer service on the Index server and wait for XML files to reappear in the directory.