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

about cache management #155

Closed
soolidtech opened this issue Jun 2, 2022 · 2 comments · Fixed by #182
Closed

about cache management #155

soolidtech opened this issue Jun 2, 2022 · 2 comments · Fixed by #182
Assignees

Comments

@soolidtech
Copy link

soolidtech commented Jun 2, 2022

Hello !
Thanks for sharing this great library !

i've created a sandbox here : https://github.com/soolidtech/test-i18n-cache

it looks like with this library, we have two possibilities for managing translations cache :

  • cached
  • not cached (fresh opt set to true)

The thing is that cached setting makes it impossible to get new translation versions except if one clean his browser's cache.
Repro can be observed by cloning my repository https://github.com/soolidtech/test-i18n-cache

steps to reproduce :
npm run start

  • change locale to french on app screen
  • screen displays "Bonjour" => ok
  • change content of imports/i18n/fr/Test.i18n.yml file with a new translation like "Bonjour Monde" and save
  • refresh app screen
  • change locale to french on app screen
  • Content is still "Bonjour"

I don't want to use "fresh" neither since it's overkill

Could we consider using etag like Meteor team does in its docs about serving a static content ?
https://docs.meteor.com/packages/webapp.html#Serving-a-Static-Landing-Page

This way, cache would be invalidated if any translation changes

Thanks for reading

@zendranm
Copy link
Member

zendranm commented Jun 3, 2022

Hi @soolidtech, thanks for your suggestion and for providing reproduction. For now ,our priority is to finalize release of version 2.0.0 so we will take care of it within the scope of this new version.

@soolidtech
Copy link
Author

Awesome. I'm already using your release candidate, with a fresh option set to true. See you !

@radekmie radekmie moved this to To do in Open Source Nov 18, 2022
@zendranm zendranm moved this from To do to In progress in Open Source Apr 21, 2023
@zendranm zendranm self-assigned this Apr 21, 2023
@github-project-automation github-project-automation bot moved this from In progress to Closed in Open Source May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants