struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz" <p...@steitz.com>
Subject Re: PropertyMessageResource cache management
Date Fri, 09 May 2003 14:31:27 GMT
David Graham wrote:
> 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.
> 
> David
> 

Thanks, David. Must be something else going on in my tests.

> 
>> From: "Phil Steitz" <phil@steitz.com>
>> Reply-To: "Struts Developers List" <struts-dev@jakarta.apache.org>
>> To: <struts-dev@jakarta.apache.org>
>> 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 discussed?
>>
>> Am I missing something?
>>
>> Phil
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: struts-dev-help@jakarta.apache.org
>>
> 
> _________________________________________________________________
> Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
> http://join.msn.com/?page=features/junkmail
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-dev-help@jakarta.apache.org
> 




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


Mime
View raw message