Repository navigation
Description
Background
MemorySafeLRUMap remains in shenyu-common, but a repository-wide reference search at master commit 67596c1d228b62da75cd0a0ecb47d0ac5d995384 finds only its declaration and dedicated tests. There are no repository-local production callers or configuration references.
This is a maintenance simplification opportunity: the class retains an additional non-thread-safe cache implementation and public constructors without serving the current runtime. It is not a measured runtime performance improvement.
Location
Proposed Scope
- Assess whether downstream consumers still use this public
shenyu-commonAPI. - If compatibility requires it, deprecate the class with a release note and document migration before a later removal.
- If removal is allowed by the project's compatibility policy, remove the implementation and its dedicated tests together.
- Retain the active
WindowTinyLFUMapimplementation. - Keep
MemoryLimitCalculatorandcommons-collections4unless a separate dependency/reference analysis proves they can be removed; repository-local non-use of this one class is insufficient evidence. - Avoid adding a replacement cache abstraction for a class with no current production callers.
Verification
rg -n 'MemorySafeLRUMap' -g '!**/target/**'
./mvnw test -pl shenyu-commonAlso inspect non-Java/reflection/config references and run the affected module's Checkstyle and RAT checks when implementing the change.
Acceptance Criteria
- Downstream/public API compatibility has been considered explicitly.
- The class is deprecated with migration guidance, or removed at a release where that API removal is acceptable.
- Dedicated tests are retained for deprecation or removed with the class.
- Active cache and memory-limit behavior remains unchanged.
- No replacement abstraction or unjustified dependency removal is introduced.
Validation And Related Issues
Severity: Low. Confidence: high for repository-local non-use; downstream use remains unknown.
An independent reviewer confirmed the reference search. Targeted UriUtilsTest,MemorySafeLRUMapTest execution passed 7 tests with zero failures.
#7309 and #7377 removed the different unused MemorySafeWindowTinyLFUMap implementation. Their scope did not include MemorySafeLRUMap. #4020 discusses historical LRU cache usage and does not establish a present production caller for this class. Searches across open/closed issues found no current retirement task for MemorySafeLRUMap.
Activity
github-actions commentedon Oct 6, 2026
👋 Hello @yuluo-yx
A new issue has been opened by @Aias00:
Please review when you have time. Thank you! 🙏