Skip to content

CachedLayoutRendererWrapper - Allow literal optimization when caching not needed#6088

Merged
snakefoot merged 1 commit intoNLog:devfrom
snakefoot:CacheAppDomain
Feb 1, 2026
Merged

CachedLayoutRendererWrapper - Allow literal optimization when caching not needed#6088
snakefoot merged 1 commit intoNLog:devfrom
snakefoot:CacheAppDomain

Conversation

@snakefoot
Copy link
Contributor

@snakefoot snakefoot commented Feb 1, 2026

Avoid overhead if by accident having assigned cached=true to something that is completely static.

@snakefoot snakefoot added the enhancement Improvement on existing feature label Feb 1, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 1, 2026

Walkthrough

A single attribute (AppDomainFixedOutput) is added to the CachedLayoutRendererWrapper class to affect output caching behavior across AppDomain boundaries, with no changes to methods or public signatures.

Changes

Cohort / File(s) Summary
AppDomain Attribute Addition
src/NLog/LayoutRenderers/Wrappers/CachedLayoutRendererWrapper.cs
Added AppDomainFixedOutput attribute to class declaration for managing output caching semantics across AppDomain boundaries.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A tiny tag upon the cache,
AppDomain boundaries now clear,
One line of wisdom, swift and bright,
The wrapper holds its ground so tight,
Fixed output hopping without fear!

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Title check ⚠️ Warning The title references 'literal optimization when caching not needed', but the change only adds an AppDomainFixedOutput attribute with no optimization logic implementation. Update the title to accurately reflect the actual change: adding AppDomainFixedOutput attribute to CachedLayoutRendererWrapper for proper AppDomain boundary behavior.
Description check ❓ Inconclusive No pull request description was provided by the author, making it impossible to assess relatedness to the changeset. Add a pull request description explaining the purpose of adding the AppDomainFixedOutput attribute and its impact on caching behavior across AppDomain boundaries.
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 1, 2026

@snakefoot snakefoot merged commit e553c40 into NLog:dev Feb 1, 2026
5 of 6 checks passed
@snakefoot snakefoot added this to the 6.1.1 milestone Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improvement on existing feature size/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant