[
https://issues.apache.org/jira/browse/WW-5355?focusedWorklogId=885237&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-885237
]
ASF GitHub Bot logged work on WW-5355:
--------------------------------------
Author: ASF GitHub Bot
Created on: 15/Oct/23 17:31
Start Date: 15/Oct/23 17:31
Worklog Time Spent: 10m
Work Description: 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.
Issue Time Tracking
-------------------
Worklog Id: (was: 885237)
Time Spent: 4h 50m (was: 4h 40m)
> Use LRU cache by default
> ------------------------
>
> Key: WW-5355
> URL: https://issues.apache.org/jira/browse/WW-5355
> Project: Struts 2
> Issue Type: Improvement
> Components: Core
> Reporter: Kusal Kithul-Godage
> Priority: Minor
> Fix For: 6.4.0
>
> Time Spent: 4h 50m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)