Skip to content

fix: use Stopwatch for ReflectionEmitCachingMemberAccessor TTL#127844

Open
unsafePtr wants to merge 1 commit intodotnet:mainfrom
unsafePtr:fix/json-emit-cache-stopwatch
Open

fix: use Stopwatch for ReflectionEmitCachingMemberAccessor TTL#127844
unsafePtr wants to merge 1 commit intodotnet:mainfrom
unsafePtr:fix/json-emit-cache-stopwatch

Conversation

@unsafePtr
Copy link
Copy Markdown
Contributor

ReflectionEmitCachingMemberAccessor.Cache uses DateTime.UtcNow.Ticks deltas for its eviction interval and per-entry sliding expiration, so an NTP step may affetc both.

Cache is in-process only, so it's better to use Stopwatch.GetTimestamp / Stopwatch.GetElapsedTime, matching #127303 and the existing WinHttpHandler.CachedCertificateValue pattern.

@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label May 6, 2026
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/area-system-text-json
See info in area-owners.md if you want to be subscribed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-System.Text.Json community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants