Class ThresholdCacheTranslationOverrideStrategy

java.lang.Object
org.broadleafcommerce.common.i18n.service.ThresholdCacheTranslationOverrideStrategy
All Implemented Interfaces:
TranslationOverrideStrategy, org.springframework.core.Ordered

@Component("blThresholdCacheTranslationOverrideStrategy") @Lazy public class ThresholdCacheTranslationOverrideStrategy extends Object implements TranslationOverrideStrategy
Default TranslationOverrideStrategy. Should run last and will always return a result. Primarily supports multitenant scenarios with the following characteristics:
  • Small to medium template translation catalog
  • Small to medium number of standard site overrides
  • Small or large quantity of individual standard sites
This strategy tries to efficiently cache all standard site overries and/or all template catalog translations. This is the highest efficiency settings, as all translations are cached on the app tier. However, if the override or template catalog member count exceeds the threshold, the strategy falls back to on demand queries that are cached as they occur. See TranslationSupport.getThresholdForFullCache() and TranslationSupport.getTemplateThresholdForFullCache() for more information on these properties and how to set their values.
Author:
Jeff Fischer
See Also: