ben-manes commented on code in PR #766:
URL: https://github.com/apache/struts/pull/766#discussion_r1359917451


##########
core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java:
##########
@@ -143,12 +143,18 @@ protected void setEnableExpressionCache(String cache) {
         enableExpressionCache = BooleanUtils.toBoolean(cache);
     }
 
-    @Inject(value = StrutsConstants.STRUTS_OGNL_EXPRESSION_CACHE_MAXSIZE, 
required = false)

Review Comment:
   ```java
   cache.policy().eviction().ifPresent(eviction -> {
     eviction.setMaximum(2 * eviction.getMaximum());
   });
   ```
   
   The 
[Policy](https://www.javadoc.io/doc/com.github.ben-manes.caffeine/caffeine/latest/com.github.benmanes.caffeine/com/github/benmanes/caffeine/cache/Policy.html)
 api contains various methods for pragmatic needs, while keeping the core apis 
simple and focused on the common needs.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@struts.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to