Applies caching to another layout output.
Platforms Supported: All
${cached:cached=Boolean:clearCache=ClearCacheOption:inner=Layout:cacheKey=Layout}
or by using ambient property to modify output of other layout renderer:
None, OnInit, Onclose
. ClearCacheOption Default: OnInit, OnClose
.
Introduced in NLog 4.2.
null
.
Introduced in NLog 4.3.9
Introduced in NLog 4.6.8
${cached:cached=true:clearCache=OnInit,OnClose:inner=l}
: The value of l
is cached and the cache will be cleared when the layout renderer is initialized or when it is closed. This is the same as ${cached:cached=true:inner=l}
.${cached:cached=true:clearCache=None:inner=l}
: The value of l
is cached and the cache will not be cleared.filename="${cached:cached=true:Inner=${date:format=yyyy-MM-dd hh.mm.ss}:CacheKey=${shortdate}}.log"
- Use the first logtime and day in the file name, only one file per day.The value of the inner layout will be rendered only once and reused subsequently.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4