<PackageReference Include="NLog" Version="6.1.0" />

NLog.LayoutRenderers.Wrappers.CachedLayoutRendererWrapper

Applies caching to another layout output.
public enum ClearCacheOption

A value indicating when the cache is cleared.

public bool Cached { get; set; }

Gets or sets a value indicating whether this CachedLayoutRendererWrapper is enabled.

public int CachedSeconds { get; set; }

Gets or sets a value indicating how many seconds the value should stay cached until it expires

public Layout CacheKey { get; set; }

Gets or sets whether to reset cached value when CacheKey output changes. Example CacheKey could render current day, so the cached-value is reset on day roll.

public ClearCacheOption ClearCache { get; set; }

Gets or sets a value indicating when the cache is cleared.