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

Issue-1178: API Settings: the latest value is rendered after an update #1179

Merged

Conversation

renatonascalves
Copy link

@renatonascalves renatonascalves commented Oct 11, 2024

Summary

Fixes #1178

This pull request addresses the issue where self::$loaded_settings are not reset after an update, causing self::get_value to use stale data. This fix ensures that after updating any settings, the new data will be correctly used by the self::get_value method. The implementation now includes updating the cached settings immediately after any settings change to ensure the self::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 the self::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

@renatonascalves renatonascalves marked this pull request as ready for review October 11, 2024 19:43
Copy link

@manewc manewc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎹

@renatonascalves renatonascalves merged commit bc3e50e into develop Oct 14, 2024
11 checks passed
@renatonascalves renatonascalves deleted the fix/issue-1178/reset-loaded-settings-after-update branch October 14, 2024 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API Settings: the latest value is rendered after an update
2 participants