This is an automated email from the ASF dual-hosted git repository.

kusal pushed a commit to branch WW-5355-cache-lru
in repository https://gitbox.apache.org/repos/asf/struts.git

commit 7afc77266b60ce665eb034f177d86770708f4121
Author: Kusal Kithul-Godage <g...@kusal.io>
AuthorDate: Tue Oct 17 14:16:27 2023 +1100

    WW-5355 Bootstrap using basic cache
---
 .../com/opensymphony/xwork2/config/impl/DefaultConfiguration.java     | 4 ++--
 .../java/com/opensymphony/xwork2/ognl/DefaultOgnlCacheFactory.java    | 2 +-
 core/src/test/java/com/opensymphony/xwork2/ognl/OgnlUtilTest.java     | 1 -
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git 
a/core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java
 
b/core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java
index 4b864e6f1..b25484222 100644
--- 
a/core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java
+++ 
b/core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java
@@ -138,9 +138,9 @@ public class DefaultConfiguration implements Configuration {
         constants.put(StrutsConstants.STRUTS_CONFIGURATION_XML_RELOAD, 
Boolean.FALSE);
         constants.put(StrutsConstants.STRUTS_I18N_RELOAD, Boolean.FALSE);
         constants.put(StrutsConstants.STRUTS_MATCHER_APPEND_NAMED_PARAMETERS, 
Boolean.TRUE);
-        constants.put(StrutsConstants.STRUTS_OGNL_EXPRESSION_CACHE_TYPE, 
OgnlCacheFactory.CacheType.CAFFEINE_WTLFU);
+        constants.put(StrutsConstants.STRUTS_OGNL_EXPRESSION_CACHE_TYPE, 
OgnlCacheFactory.CacheType.BASIC);
         constants.put(StrutsConstants.STRUTS_OGNL_EXPRESSION_CACHE_MAXSIZE, 
10000);
-        constants.put(StrutsConstants.STRUTS_OGNL_BEANINFO_CACHE_TYPE, 
OgnlCacheFactory.CacheType.CAFFEINE_WTLFU);
+        constants.put(StrutsConstants.STRUTS_OGNL_BEANINFO_CACHE_TYPE, 
OgnlCacheFactory.CacheType.BASIC);
         constants.put(StrutsConstants.STRUTS_OGNL_BEANINFO_CACHE_MAXSIZE, 
10000);
         BOOTSTRAP_CONSTANTS = Collections.unmodifiableMap(constants);
     }
diff --git 
a/core/src/main/java/com/opensymphony/xwork2/ognl/DefaultOgnlCacheFactory.java 
b/core/src/main/java/com/opensymphony/xwork2/ognl/DefaultOgnlCacheFactory.java
index e25334c50..29dc7fc7f 100644
--- 
a/core/src/main/java/com/opensymphony/xwork2/ognl/DefaultOgnlCacheFactory.java
+++ 
b/core/src/main/java/com/opensymphony/xwork2/ognl/DefaultOgnlCacheFactory.java
@@ -38,7 +38,7 @@ public class DefaultOgnlCacheFactory<Key, Value> implements 
OgnlCacheFactory<Key
      */
     @Deprecated
     public DefaultOgnlCacheFactory() {
-        this(10000, CacheType.CAFFEINE_WTLFU);
+        this(10000, CacheType.BASIC);
     }
 
     public DefaultOgnlCacheFactory(int cacheMaxSize, CacheType 
defaultCacheType) {
diff --git a/core/src/test/java/com/opensymphony/xwork2/ognl/OgnlUtilTest.java 
b/core/src/test/java/com/opensymphony/xwork2/ognl/OgnlUtilTest.java
index 106671501..8db142ba6 100644
--- a/core/src/test/java/com/opensymphony/xwork2/ognl/OgnlUtilTest.java
+++ b/core/src/test/java/com/opensymphony/xwork2/ognl/OgnlUtilTest.java
@@ -137,7 +137,6 @@ public class OgnlUtilTest extends XWorkTestCase {
         super.loadConfigurationProviders(new StubConfigurationProvider() {
             @Override
             public void register(ContainerBuilder builder, LocatableProperties 
props) throws ConfigurationException {
-                
props.setProperty(StrutsConstants.STRUTS_OGNL_EXPRESSION_CACHE_TYPE, 
"concurrent_basic");
                 
props.setProperty(StrutsConstants.STRUTS_OGNL_EXPRESSION_CACHE_MAXSIZE, "1");
             }
         });

Reply via email to