mirror of
https://github.com/apache/struts.git
synced 2026-09-11 00:29:40 +00:00
c520a3c711
The Tiles definition caches are keyed by the resolved Locale, which by default derives from the request. Both CachingLocaleUrlDefinitionDAO's locale2definitionMap and AbstractPatternDefinitionResolver's localePatternPaths grew without limit and were never reduced for the lifetime of the web application. Bound locale2definitionMap with an insertion-order LinkedHashMap capped at maxCachedLocales (default 1000, configurable via setMaxCachedLocales). On eviction the DAO removes the same key from the pattern resolver via the new PatternDefinitionResolver#removePatternPaths, keeping both maps in lockstep (the resolver's keys are always a subset of the DAO's). localePatternPaths becomes a ConcurrentHashMap since the DAO now removes keys off the request thread. Eviction only re-incurs a load, never changes rendering. Fixes https://issues.apache.org/jira/browse/WW-5716 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015huuB72yvZygWEXKUYDAou
Struts 2 Plugins
A set of officially supported plugins which are provided with the framework, you can read more about them in the documentation.