You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Lukasz Lenart (Jira)" <ji...@apache.org> on 2025/09/23 12:51:00 UTC

[jira] [Updated] (WW-5514) Allow configuration of ProxyUtil for cache types

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

Lukasz Lenart updated WW-5514:
------------------------------
    Fix Version/s: 7.2.0
                   6.9.0
                       (was: 7.1.0)
                       (was: 6.8.0)

> Allow configuration of ProxyUtil for cache types
> ------------------------------------------------
>
>                 Key: WW-5514
>                 URL: https://issues.apache.org/jira/browse/WW-5514
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 6.6.0
>            Reporter: Jon Pulice
>            Priority: Minor
>             Fix For: 7.2.0, 6.9.0
>
>
> Since 6.6.0, the ProxyUtil class now always uses the WTLFU cache type when creating its two internal caches. This means that the caffeine 
> library is now mandatory when it was not before.
> {code:java}
>   private static final OgnlCache<Class<?>, Boolean> isProxyCache = (new DefaultOgnlCacheFactory(10000, OgnlCacheFactory.CacheType.WTLFU, 256))
>     .buildOgnlCache();
>   private static final OgnlCache<Member, Boolean> isProxyMemberCache = (new DefaultOgnlCacheFactory(10000, OgnlCacheFactory.CacheType.WTLFU, 256))
>     .buildOgnlCache();{code}
>  
> Prior to 6.6.0, setting both of these configuration options would allow you to omit the caffeine dependency from an application:
> {code:java}
> <constant name="struts.ognl.expressionCacheType" value ="basic" />
> <constant name="struts.ognl.beanInfoCacheType" value="basic" />{code}
>  
> Would it be possible to allow for the cache type used by the ProxyUtil class to be configurable as well similar to the above?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)