-
Notifications
You must be signed in to change notification settings - Fork 751
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 to settings saving in MVC modules #3756
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bdukes
approved these changes
May 12, 2020
mitchelsellers
approved these changes
May 12, 2020
@donker it looks like this broke a whole bunch of tests, can you review? |
Looks like |
You're right, Brian. It fails because there are no ModuleSettings on the mocked ModuleInfo. And since you can't just create them empty there is no easy fix. Or is there? |
I've pushed a fix |
mitchelsellers
approved these changes
May 12, 2020
2 tasks
valadas
added a commit
to valadas/Dnn.Platform
that referenced
this pull request
Jul 14, 2023
One may have a settings class that includes a mix of HostSettings, PortalSettings, ModuleSettings and TabModuleSettings. The previous mechanism had different cache keys for PortalId or TabModuleId, but that brough 2 problems: 1. It is possible to have the same number for a portalId and TabModuleId which would invalidate the wrong cache. 2. When reading settings using the GetSettings method overload that takes moduleInfo, it would get stale settings for all PortalSettings if it was saved also using moduleInfo overload. I am on the fence about this PR, but it caches now using always portalId. PROS: It fixed the issue at hand. CONS: It clears the portal settings cache to be clear, not the whole portal settings cache but only the specifiec settings class type being requested. This is maybe a tiny tiny bit of a performance hit, but it's not like saving settings is something that gets hammerd. So I believe the benifits here outweigh the drawbacks. Closes dnnsoftware#5739 Possibly a different fix for the workaround in dnnsoftware#3756 but I don't have any MVC custom module to test that part...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #3692