-
Notifications
You must be signed in to change notification settings - Fork 38.4k
Refresh cache in ReloadableResourceBundleMessageSource
#31638
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
Conversation
This change allows subclasses to call getMergedProperties(locale) when cacheSeconds > 0 and get refreshed contents. Useful for SPA webapps to deliver all translations to the browser. Since all individual files are refreshed concurrently, the thread that refreshes mergedHolder can get stale data for any file being refreshed so simply comparing maximal fileTimestamp is not enough to detect change - used hashCode for this purpose.
@vershnik Please sign the Contributor License Agreement! Click here to manually synchronize the status of this Pull Request. See the FAQ for frequently asked questions. |
@vershnik Thank you for signing the Contributor License Agreement! |
ReloadableResourceBundleMessageSource
@vershnik this PR has a a commit from @andreibastun. The author should be the one submitting the PR as they're the one signing the CLA. |
@snicoll Sorry, I didn't notice that my second account was singed in the git when commiting. Now I accepthed CLA from both accounts. |
Thanks for the PR but we're not keen to make |
This change allows subclasses to call getMergedProperties(locale) when
cacheSeconds > 0 and get refreshed contents. Useful for SPA webapps to
deliver all translations to the browser.
Since all individual files can be refreshed concurrently, the thread that
refreshes mergedHolder can get stale data for any file being refreshed
so simply comparing maximal fileTimestamp is not enough to detect
change - used hashCode for this purpose.