清除配置缓存 [英] Clear config cache

查看:133
本文介绍了清除配置缓存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有一个疑问,

每次我们进行服务器重启都会清除配置缓存那台服务器呢?

Every time we do a server restart does that clear the config cache of that server as well ?

推荐答案

我不相信,你可以手动清除通过执行以下步骤来执行SharePoint配置缓存:

I believe not, you can manually clear the SharePoint config cache by performing the following steps:


  1. 停止 所有服务器上的> SharePoint定时服务,从运行管理中心网站的服务器开始。

    开始 - > Services.msc - > SharePoint定时服务





  2. 转到文件资源管理器中的%SystemDrive%\ProgramData \ MicroCos \ SharePoint \Config文件夹。默认情况下隐藏Program Data文件夹,因此您可能必须在文件资源管理器中取消隐藏它。作为最佳实践,我建议在所有Windows服务器上显示隐藏文件。



  3. Config中有几个带GUID的文件夹夹。你想要名字中带连字符的那个。

  4. 在这个文件夹里你会发现很多文件。您的目标是删除除cache.ini之外的所有文件。首先备份cache.ini文件。您可以将其复制并粘贴到同一文件夹中。缓存 - Copy.ini将成为您的备份文件。

  5. 现在您已经备份了cache.ini文件,您需要删除所有.xml文件。在数千个文件中查找cache.ini文件的最简单方法是通过单击列标题对Type列进行排序。

  6. 单击Ctrl-A以突出显示所有文件文件夹中的文件然后按住Ctrl键单击cache.ini以取消选中。



  7. 删除所有文件。这将只为您提供此文件夹中的cache.ini文件。请勿删除该文件夹。您的目标是在系统创建的同一文件夹中重建缓存。

  8. 打开cache.ini文件。您可能希望文件中有大量信息,但它只有5位或6位数字,例如356867.将此数字替换为1,因此文件中的唯一数据是数字1.现在保存文件。将此数字更改为
    1将重置缓存,并在重新启动SharePoint定时服务后重建它。

  9. 开始 <服务控制台中的strong> SharePoint定时服务。

  10. 您会注意到缓存文件开始填充文件夹。在我的情况下,它只需要几秒钟,但根据您的环境和配置,它可能需要更长的时间。

  11. 验证cache.ini文件中的值不再是1 。它可能是一个不同于之前的5-6位数字。

  12. 此时您已成功清除了SharePoint配置缓存。
  1. Stop the SharePoint Timer service on all the servers, start with the server running Central Administration website.
    Start -> Services.msc -> SharePoint Timer Service


  2. Go to %SystemDrive%\ProgramData\Microsoft\SharePoint\Config folder in File Explorer. The Program Data folder is hidden by default so you may have to unhide it in the File Explorer. As a best practice, I recommend displaying hidden files on all Windows servers.

  3. There are a couple of folders with the GUID in the Config folder. You want the one that has hyphens in the name.
  4. Inside this folder you will find lots of files. Your goal is to delete all the files, except the cache.ini. First make a backup of the cache.ini file. You can either copy and paste it in the same folder. The cache – Copy.ini will become your backup file.
  5. Now that you have a backup of the cache.ini file, you need to delete all the .xml files. The easiest way to find the cache.ini file among thousands of files is to sort the Type column by clicking on the column header.
  6. Click Ctrl-A to highlight all the files in the folder and then Ctrl-click cache.ini so it is deselected.

  7. Delete all the files. This will leave you with only the cache.ini file in this folder. DO NOT delete the folder. Your goal is to rebuild the cache in the same folder that was created by the system.
  8. Open the cache.ini file. You are probably expecting tons of information in the file but all it has is a 5 or 6-digit number, e.g. 356867. Replace this number with 1 so the only data in the file is the number 1. Now save the file. Changing this number to 1 resets the cache and it will be rebuild after the SharePoint Timer Service is restarted.
  9. Start the SharePoint Timer Service in the Services Console.
  10. You will notice that the cache files start to populate the folder. In my case it only took a few seconds but depending on your environment and configuration it may take longer.
  11. Verify that the value in the cache.ini file is no longer 1. It is likely to be a different 5-6 digit number than it was before.
  12. You have successfully cleared your SharePoint config cache at this point.

您还可以使用 PowerShell 清除配置缓存,以便使用以下脚本:

You can also clear the configuration cache with PowerShell, so you can use the script below:

# Add Snapin

# Start Loading SharePoint Snap-in


snapin =(Get-PSSnapin -name Microsoft .SharePoint.PowerShell -EA SilentlyContinue)IF(
snapin = (Get-PSSnapin -name Microsoft.SharePoint.PowerShell -EA SilentlyContinue)IF (


snapin -ne
snapin -ne


这篇关于清除配置缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆