Lukasz Lenart created WW-5672:
---------------------------------
Summary: Allow per-cache size configuration for the localized-text
provider caches
Key: WW-5672
URL: https://issues.apache.org/jira/browse/WW-5672
Project: Struts 2
Issue Type: Improvement
Reporter: Lukasz Lenart
Fix For: 7.4.0
Follow-up to WW-5668.
WW-5668 gave the localized-text provider caches a configurable bound, but
deliberately shipped a single setting: {{struts.i18n.cacheMaxSize}} applies the
same maximum to every one of them.
Those caches do not have the same natural size. The class- and
package-hierarchy caches are keyed by a message key combined with a class or
package, so their population scales with the application's action and key
count. The bundle, message-format and missing-bundle caches are keyed with the
locale, so their population scales with locale diversity instead. Sizing them
together means one shared number is either generous for the small caches or too
tight for the large ones, and an operator tuning for one cannot avoid affecting
the others.
Allow the individual caches to be sized separately, while keeping a single
setting that sets the default for all of them so existing configurations
continue to work untouched.
Note the 6.x maintenance line has three of these caches rather than five; the
hierarchy caches arrived with WW-5540 on the 7.x line only.
h2. Scope / acceptance
* Each localized-text cache can be given its own maximum size.
* {{struts.i18n.cacheMaxSize}} continues to work as the default for any cache
that is not sized individually; an application setting only that value sees no
change in behaviour.
* Defaults documented in {{default.properties}} alongside the existing entries.
* Tests cover that an individually configured bound is honoured and does not
affect the other caches.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)