The Log singles cache

Abstract

Describes the Log singles cache

Sitecore uses the Log singles cache to prevent repeating error messages in the log.

For example, if an item has an invalid template, an error message about this is only logged once, instead of a message being logged for each request. There is no data loss, as additional log messages are logged again if the cache no longer contains the same messages.

This cache uses the value of the Caching.SmallCacheSize configuration setting value to specify the cache size. Some other caches use the same setting. By default, the setting is not present in the configuration, but you can add it by patching the configuration. Specify the value in the <settings> node.

The default size is 200 KB:

<setting name="Caching.SmallCacheSize" value="200KB" />

The default size is normally enough, but if, for example, you actively use language fallback, you may want to increase the cache size. In this case, set the size to, for example, 5MB and check the logs to see if cache clearing is still happening.