내가 Sitecore와 전에이 문제에 건너와 약간 다른 approch했다했습니다. 스테이징 모듈이 호출하는 페이지 대신 publish : end 이벤트를 두드리고 사용자 정의 핸들러를 추가하여 링크 데이터베이스를 다시 작성합니다.
<event name="publish:end">
<handler type="Sitecore.Publishing.HtmlCacheClearer, Sitecore.Kernel" method="ClearCache">
<sites hint="list">
<site>website</site>
</sites>
</handler>
<handler type="Sitecore.EventHandlers.CredentialCacheClearer, Sitecore.EventHandlers" method="ClearCache">
<sites hint="list">
<site>website</site>
</sites>
</handler>
// Custom Publish Action Below
<handler type="Customized.Publish.LinkDatabase, Customized" method="Process"/>
</event>
namespace Customized.Publish
{
public class LinkDatabase
{
/// <summary>
/// Rebuild the web link database.
/// </summary>
public void Process()
{
// Web db
Sitecore.Globals.LinkDatabase.Rebuild(Sitecore.Configuration.Factory.GetDatabase("web"));
}
/// <summary>
/// For invoking as an event, typically publish:end.
/// </summary>
public void Process(object sender, EventArgs args)
{
this.Process();
}
}
}