Skip to content

Conversation

@damienalexandre
Copy link
Contributor

This is a proposal for cache clearing after translation editing. As the Edit In Place functionality is supposed to be used "live", it was looking "broken" because even if a translation is edited correctly, Symfony still display the old messages until the cache is cleared.

I can't think of any better solution but I do not like this very much, editing the cache directory seems like a hack... 😕

II tried another approach: doing a touch() on the translation files and calling the warmer, but Symfony Cache implementation for translations don't have any resourceCheckers so it can't work. We have to remove the file for them to be rewritten.

About the name('*.'.$locale.'.*') pattern, I checked and it's compatible with Symfony 2.7 and more.

Ref #63

Copy link
Member

@Nyholm Nyholm left a comment

Choose a reason for hiding this comment

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

Thanks.
One could improve this further by only remove the correct domain.

I do not know any other way of doing this. We should, however, write a warning about this in the docs.

@Nyholm
Copy link
Member

Nyholm commented Jan 16, 2017

@damienalexandre, merge if you are happy with it =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants