You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Juergen Donnerstag (JIRA)" <ji...@apache.org> on 2009/02/13 17:15:04 UTC

[jira] Resolved: (WICKET-2102) Localizer never caches resources when component is not given

     [ https://issues.apache.org/jira/browse/WICKET-2102?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Juergen Donnerstag resolved WICKET-2102.
----------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.4-RC3
         Assignee: Juergen Donnerstag

thanks

> Localizer never caches resources when component is not given
> ------------------------------------------------------------
>
>                 Key: WICKET-2102
>                 URL: https://issues.apache.org/jira/browse/WICKET-2102
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.5
>            Reporter: Pavel Cernocky
>            Assignee: Juergen Donnerstag
>             Fix For: 1.4-RC3
>
>         Attachments: diff.patch
>
>
> In org.apache.wicket.Localizer.getString(String, Component, IModel, String) there's this code:
> // If this component is not yet added to page we do not want to check
> // cache as we can generate an invalid cache key
> if ((cache != null) && addedToPage)
> {
> 	cacheKey = getCacheKey(key, component);
> }
> If the component is null, then addedToPage is always false, thus cacheKey is never populated and possibly found resource is never put in cache.
> The condition should be:
> if ((cache != null) && (component == null || addedToPage))
> Cheers,
> Palo

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.