Closed mlocati closed 6 years ago
I'm afraid I don't understand the use case: what would this enable, exactly? You mention it would be useful for subclasses of Translator
, but now how...
We have translation that are changing during the run time of our app and we need to invalidate the translation-cache to trigger a reload of the underlying translation providers.
Therefor I'd like to propose adding this function and marking it public.
Better yet: a function that clears the cache of a specific text domain / language.
I'm not sure if @mlocati is active on gh anymore that's why I've added a PR with my proposal based upon his PR. Sorry if I'm stealing your thunder!
I'm afraid I don't understand the use case: what would this enable, exactly? You mention it would be useful for subclasses of Translator, but now how...
@weierophinney I absolutely can't remember why we needed this (there has been a lot of water under the bridge...), but I guess we needed something like @MatthiasKuehneEllerhold wrote above (and we solved in another way because of lack of activity of ZF).
I'm not sure if @mlocati is active on gh anymore
@MatthiasKuehneEllerhold Sure: loot at how green is my GitHub wall :wink:
that's why I've added a PR with my proposal based upon his PR. Sorry if I'm stealing your thunder!
No problems at all! I'm closing this #63 in flavor of #93.
What about adding a
getCacheId
method to get the ID of the cache item?That would be useful when subclassing
Translator
(for instance, we'd need a cache ID that depends on the contents of the$files
,$patterns
and$remote
properties).