struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Graham" <>
Subject Re: PropertyMessageResource cache management
Date Fri, 09 May 2003 14:05:23 GMT
It looks like MessageResources only caches the MessageFormat objects.  
PropertyMessageResources only overrides the getMessage(Locale, String) 
method and caches all of those messages.  Since that method takes no 
replacement values the cache should not grow for each user, just for each 
message that has no replacement values.


>From: "Phil Steitz" <>
>Reply-To: "Struts Developers List" <>
>To: <>
>Subject: PropertyMessageResource cache management
>Date: Fri, 09 May 2003 00:25:29 -0700
>It looks to me like the messages cache in PropertyMessageResources can grow 
>without bound, since messages.getMessage("hello.message",userName); will 
>put an entry into the cache for each userName.  Do I have this right?
>If I do have this right, this will cause problems for high-volume apps that 
>use getMessage() with request- or session-specific parameters.  I am seeing 
>steady memory consumption growth in load tests where I use this. Is there 
>any bound to the size of the cache? I am also curious about the impact that 
>the synchronization may have under high concurrency loads.  Has anyone 
>tested this?
>If I understand how the code is working correctly, it might be best to 
>allow the caching to be turned off or to do something in the way of cache 
>management (enforce time to live and/or max cache size).  Should I submit 
>patches/more detailed suggestions for this?  Has this already been 
>Am I missing something?
>To unsubscribe, e-mail:
>For additional commands, e-mail:

Help STOP SPAM with the new MSN 8 and get 2 months FREE*

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message