Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cache in RestService for generated type #1348

Merged
merged 2 commits into from
Apr 12, 2023

Conversation

Int32Overflow
Copy link
Contributor

@Int32Overflow Int32Overflow commented May 5, 2022

What kind of change does this PR introduce?
BugFix

What is the current behavior?
There is a dictionary for caching the type for generated interfaces. However, the type is currently created anew each time and thus hijacks the cache!

What is the new behavior?
The type is generated only once.

What might this PR break?
nothing

Please check if the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Other information:
The old solution called the method "GetGeneratedType" each time and thus generated the type again each time. Even if the type was already registered in the dictionary.

The new solution only passes a method pointer (delegate) and only calls the method if the type does not yet exist in the dictionary.

@Int32Overflow Int32Overflow mentioned this pull request Apr 12, 2023
2 tasks
@glennawatson glennawatson merged commit 3c87611 into reactiveui:main Apr 12, 2023
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants