I’ve patched EventQueues several times through the years, so I saved this Gist to make it easier for future opportunities. There’s not much new to share in terms of introducing why one does this, refer to this blog about Sitecore artifact tables (or the old reliable Sitecore CMS Tuning Guide). You also have to take care around the order of configuration file processing, so zzzzzArtifactTableRetention.config this sucker if you really must 🙂
Here’s the Gist – https://gist.github.com/grant-killian/ffa1e84770b10a90e2454e241986b911 and here’s the expanded XML:
<?xml version="1.0" encoding="utf-8" ?> | |
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> | |
<sitecore> | |
<scheduling> | |
<agent type="Sitecore.Tasks.CleanupEventQueue, Sitecore.Kernel"> | |
<patch:delete /> | |
</agent> | |
<agent type="Sitecore.Tasks.CleanupEventQueue, Sitecore.Kernel" method="Run" interval="01:00:00"> | |
<IntervalToKeep>06:00:00</IntervalToKeep> | |
</agent> | |
<agent type="Sitecore.Tasks.CleanupPublishQueue, Sitecore.Kernel"> | |
<patch:delete /> | |
</agent> | |
<agent type="Sitecore.Tasks.CleanupPublishQueue, Sitecore.Kernel" method="Run" interval="04:00:00"> | |
<DaysToKeep>7</DaysToKeep> | |
</agent> | |
</scheduling> | |
<databases> | |
<database id="master"> | |
<Engines.HistoryEngine.Storage> | |
<patch:delete /> | |
</Engines.HistoryEngine.Storage> | |
<Engines.HistoryEngine.Storage> | |
<obj type="Sitecore.Data.SqlServer.SqlServerHistoryStorage, Sitecore.Kernel"> | |
<param connectionStringName="$(id)" /> | |
<EntryLifeTime>7.00:00:00</EntryLifeTime> | |
</obj> | |
</Engines.HistoryEngine.Storage> | |
</database> | |
<database id="web"> | |
<Engines.HistoryEngine.Storage> | |
<patch:delete /> | |
</Engines.HistoryEngine.Storage> | |
<Engines.HistoryEngine.Storage> | |
<obj type="Sitecore.Data.SqlServer.SqlServerHistoryStorage, Sitecore.Kernel"> | |
<param connectionStringName="$(id)" /> | |
<EntryLifeTime>7.00:00:00</EntryLifeTime> | |
</obj> | |
</Engines.HistoryEngine.Storage> | |
</database> | |
</databases> | |
</sitecore> | |
</configuration> |