Skip to content

Commit

Permalink
WW-5355 Bootstrap using basic cache
Browse files Browse the repository at this point in the history
  • Loading branch information
kusalk committed Oct 17, 2023
1 parent 7cded18 commit 7afc772
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ public void testCacheEnabledMaxSize() throws OgnlException {
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");
}
});
Expand Down

0 comments on commit 7afc772

Please sign in to comment.