You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Lukasz Lenart <lu...@apache.org> on 2016/07/13 06:49:34 UTC
Cache
Hi,
I've just learned that FreeMarker us using SoftReferences in its cache
implementation. I'm wondering if it would make sense to use the same
in Struts & OGNL instead of ConcurentHasMaps?
http://freemarker.org/docs/api/freemarker/ext/util/ModelCache.html
https://docs.oracle.com/javase/7/docs/api/java/lang/ref/SoftReference.html
Regards
--
Ćukasz
+ 48 606 323 122 http://www.lenart.org.pl/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: Cache
Posted by Christoph Nenning <Ch...@lex-com.net>.
> Hi,
>
> I've just learned that FreeMarker us using SoftReferences in its cache
> implementation. I'm wondering if it would make sense to use the same
> in Struts & OGNL instead of ConcurentHasMaps?
>
> http://freemarker.org/docs/api/freemarker/ext/util/ModelCache.html
>
https://docs.oracle.com/javase/7/docs/api/java/lang/ref/SoftReference.html
>
>
Not sure if it would be worth it. As far as I understand the javadoc
SoftReference only has a benefit when memory is realy low. In the age of
cloud datacenters memory should not be an issue for most apps, IMHO.
On the other hand: I don't know how much work that would be, which parts
of struts codebase would be affected and how many bugs that could
introduce.
Just my thoughts.
Regards,
Christoph
This Email was scanned by Sophos Anti Virus