[ 
https://issues.apache.org/jira/browse/SLING-4795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14587656#comment-14587656
 ] 

Konrad Windszus commented on SLING-4795:
----------------------------------------

[~justinedelson] Thanks for the hint, but each JCRResourceBundle only contains 
messages from one locale and base name. Wiring the ResourceBundles together is 
done in 
https://github.com/apache/sling/blob/trunk/bundles/extensions/i18n/src/main/java/org/apache/sling/i18n/impl/JcrResourceBundleProvider.java#L347
 and also leverages the cache itself. So the only problematic case is the 
following
# You have 3 resource bundles with the same base name and the following 
locales: {{de_CH}}, {{de}}, {{en}}
# {{de}} is modified and therefore the according resource bundle is reloaded
# {{de_CH}} is still having the old {{de}} resource bundle as a parent
I will try to come up with a test and a fix for that. So basically with each 
change of one resource bundle, all resource bundles must adjust their parents 
to take that into account.

[~alexander.klimetschek]
Regarding the asynchronous processing of Events I created the new issue 
SLING-4811.
I will try to come up with some numbers.

> Only discard the ResourceBundles if they are really invalid
> -----------------------------------------------------------
>
>                 Key: SLING-4795
>                 URL: https://issues.apache.org/jira/browse/SLING-4795
>             Project: Sling
>          Issue Type: Improvement
>          Components: Extensions
>    Affects Versions: i18n 2.4.4
>            Reporter: Konrad Windszus
>            Assignee: Konrad Windszus
>
> Currently on all changes on the JCR language nodes the full cache in 
> {{JcrResourceBundleProvider}} becomes invalid.
> Since most of the changes won't change the actual locale or basename the 
> invalidation could be improved so that only that {{JcrResourceBundle}} gets 
> invalid, which is having the same locale/basename.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to