Click or drag to resize

CachedLayoutRendererWrapper Class

Applies caching to another layout output.
Inheritance Hierarchy
SystemObject
  NLog.LayoutRenderersLayoutRenderer
    NLog.LayoutRenderers.WrappersWrapperLayoutRendererBase
      NLog.LayoutRenderers.WrappersCachedLayoutRendererWrapper

Namespace:  NLog.LayoutRenderers.Wrappers
Assembly:  NLog (in NLog.dll) Version: 5.3.4+73d83d3161d31288ca5c554cc50d27b6bed5f28b
Syntax
public sealed class CachedLayoutRendererWrapper : WrapperLayoutRendererBase

The CachedLayoutRendererWrapper type exposes the following members.

Constructors
  NameDescription
Public methodCachedLayoutRendererWrapper
Initializes a new instance of the CachedLayoutRendererWrapper class
Top
Properties
  NameDescription
Public propertyCached
Gets or sets a value indicating whether this CachedLayoutRendererWrapper is enabled.
Public propertyCachedSeconds
Gets or sets a value indicating how many seconds the value should stay cached until it expires
Public propertyCacheKey
Cachekey. If the cachekey changes, resets the value. For example, the cachekey would be the current day.s
Public propertyClearCache
Gets or sets a value indicating when the cache is cleared.
Public propertyInner
Gets or sets the wrapped layout. [DefaultParameter] so Inner: is not required if it's the first
(Inherited from WrapperLayoutRendererBase.)
Top
Methods
  NameDescription
Public methodRender
Renders the value of layout renderer in the context of the specified log event.
(Inherited from LayoutRenderer.)
Public methodToString
Returns a string that represents the current object.
(Inherited from LayoutRenderer.)
Top
Remarks
The value of the inner layout will be rendered only once and reused subsequently. See NLog Wiki
See Also