6mmLIU opened a new issue, #16038: URL: https://github.com/apache/dubbo/issues/16038
### Pre-check - [x] I am sure that all the content I provide is in English. ### Search before asking - [x] I had searched in the [issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no similar issues. ### Apache Dubbo Component Java SDK (apache/dubbo) ### Dubbo Version Dubbo 3.3.6, JDK 17, Ubuntu 22.04 ### Steps to reproduce this issue 1. Create an LRUCache (or LRU2Cache) with maxCapacity = 3. 2. Put three entries: one, two, three. 3. Access one entry to update LRU order. 4. Call setMaxCapacity(2). 5. Observe that the cache size remains 3 and the eldest entry is not evicted immediately. ### What you expected to happen After calling setMaxCapacity(2), the cache should immediately evict the eldest entry so the size does not exceed the new limit. ### Anything else _No response_ ### Do you have a (mini) reproduction demo? - [ ] Yes, I have a minimal reproduction demo to help resolve this issue more effectively! ### Are you willing to submit a pull request to fix on your own? - [x] Yes I am willing to submit a pull request on my own! ### Code of Conduct - [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
