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

NLog.LayoutRenderers.Wrappers.CachedLayoutRendererWrapper

Applies caching to another layout output.
public enum CachedUntilLifetime

A value indicating when the cached value expires, because the time of the LogEventInfo has moved into a new period.

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 CachedUntilLifetime CachedUntil { get; set; }

Gets or sets when the cached value should expire, so it is reset exactly when the hour or day of the LogEvent TimeStamp changes. Example HourChange will reset the cached value at the start of every hour.

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.