Issue-1178: API Settings: the latest value
is rendered after an update
#1179
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.
Summary
Fixes #1178
This pull request addresses the issue where
self::$loaded_settings
are not reset after an update, causingself::get_value
to use stale data. This fix ensures that after updating any settings, the new data will be correctly used by theself::get_value
method. The implementation now includes updating the cached settings immediately after any settings change to ensure theself::get_value
method uses the most current data.Description
We need to reset the
self::$loaded_settings
after an update. When we perform an update to any of the settings, the new data is not used by theself::get_value
method because the data is statically cached. The update ensures that the cache is refreshed immediately after a settings change, addressing the issue of stale data.Relevant code section
Steps To Reproduce
CleanShot.2024-10-11.at.16.36.19.mp4
Additional Information
No response