Fix memory leak in CaffeineCacheManager static mode by NYgomets · Pull Request #35821 · spring-projects/spring-framework
When setCacheNames() is called to switch from dynamic to static mode, dynamically created caches were not removed from the internal cacheMap, causing: 1. Memory leak (orphaned cache references) 2. Violation of Javadoc contract stating cache names will be 'fixed' 3. getCacheNames() returning unexpected cache names This fix ensures that dynamically created caches are cleared when switching to static mode, while preserving custom caches registered via registerCustomCache(). Signed-off-by: ParkJuhyeong <wngud5957@naver.com>
Issues in core modules (aop, beans, core, context, expression)
label
Nov 15, 2025This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters