How to clear config cache in SharePoint 2016

[Verified]: Clear config cache in SharePoint 2019/2016/2013/2010

No comments

Loading

Clear config cache in SharePoint – the config cache is a magical directory in the SharePoint server, why I said the magical directory is – for the many problems in SharePoint, the solution is clearing the config cache, mostly when the out of the timer job does not behave as expected or does not run as per the timer job scheduler, then if we clear the config cache, the issue will be fixed. By the way, what is the config cache in the SharePoint server?

Config Cache in SharePoint server – Clear config cache in SharePoint

The config cache is system generated directory or folder in SharePoint which consists of thousands of XML files and a cache.ini configuration settings file, these files get updated upon restarting the SharePoint timer service.

The configuration cache exists on each SharePoint server joined to the farm, regardless of the role of the server.

The cache is stored at the below location:

Syntax:

%SystemDrive%\ProgramData\Microsoft\SharePoint\Config

Example:

C:\ProgramData\Microsoft\SharePoint\Config<GUID>\and consists of thousands of XML files and a single cache.ini file.

 

These XML files are the farm objects from the SharePoint Configuration database (SharePoint_Config) within the Objects table.

How to clear the SharePoint Configuration cache file?

In order to clear the SharePoint Configuration cache we need to follow the below steps:

  1. Stop the SharePoint Timer Service on all the servers connected to the SharePoint Farm, start with the server running the Central Administration website, generally, it will be hosted in the application server. Follow the below navigation (click on the start button, then type service.msc and so on as below).
    Start -> Services.msc -> SharePoint Timer Service
  2. Go to the this path: %SystemDrive%\ProgramData\Microsoft\SharePoint\Config (Example: C:\ProgramData\Microsoft\SharePoint\Config)
  3. There are a couple of folders with the GUID in the Config folder. We want the one that has hyphens in the name.
  4. Take the backup of the GUID folder (which has a hyphen) and keep it somewhere or on the desktop. Here the purpose is to delete all XML files except the cache.ini file.
  5. Take the backup of the cache.ini file and keep it in the same location or somewhere in your preferred location.
  6. Now, key CTRL+A key selects all files in the location and deselects the cache .inf file.
  7. Delete all XML files.
  8. Open the cache.ini file. It is a 5 or 6-digit number, e.g. 357856. Now replace this number with just number 1 so the only data in the file is the number 1. Now save the file, change this number to 1 resets the cache and it will be rebuilt after the SharePoint Timer Service is restarted.
  9. Start the SharePoint Timer Service in the Services Console.
  10. Wait for a few seconds, then we will see that the same GUID location has been filled up with thousands of XML files again.
  11. Now, open the cache.ini file again, and verify that the data inside it is not 1 but it has been updated with the 5 or 6-digit number as it was before the update.
  12. Done, and continue the same steps in the WFE server and other servers connected to the farm.

Summary: Clear config cache in SharePoint

Thus, in this article, we have learned what is SharePoint Configuration cache and how to clear the SharePoint config cache.

See Also: Clear config cache in SharePoint

You may look into the below SharePoint troubleshooting articles:

About Post Author

Do you have a better solution or question on this topic? Please leave a comment