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

how can refresh cache? #82

Closed
ByZhouhang opened this issue Mar 14, 2024 · 6 comments · Fixed by #87
Closed

how can refresh cache? #82

ByZhouhang opened this issue Mar 14, 2024 · 6 comments · Fixed by #87

Comments

@ByZhouhang
Copy link

in my project i use this project and IStringLocalizer

When I change the internationalization prompt, i will mofiy json file immediately and want the program to return the modified prompt immediately, but I find that the program returns the same prompt as before

`
return ResponseOutput.NotOk(_localizer["TrialMaint_PersonnelJoined"]);

`

@hishamco
Copy link
Owner

To clarify, are you asking that you localize a resource and then change the json file so it doesn't reflect?

@ByZhouhang
Copy link
Author

To clarify, are you asking that you localize a resource and then change the json file so it doesn't reflect?

yes,When I debugged the breakpoint, I confirmed that the json file was indeed modified, but the values I saw in IStringLocalizer were still the same as before

@hishamco
Copy link
Owner

You need to restart the app. I remember in the past I used the Configuration system so it reloads the data automatically when the source is changed

Please let me check and get back to you

@hishamco
Copy link
Owner

@ByZhouhang do you want to submit a PR to refresh the cache when the underlying storage changes?

@ByZhouhang
Copy link
Author

@ByZhouhang do you want to submit a PR to refresh the cache when the underlying storage changes?@ByZhouhang

I've never submitted a PR, maybe it's better if you have time to fix this

@hishamco
Copy link
Owner

I struggled for to last few days to add a few features, I just released 3.3.0 version, hope to spend some time to fix this issue

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 a pull request may close this issue.

2 participants