Class CachingTranslationsProvider
java.lang.Object
com.codebarrel.jira.plugin.automation.util.AbstractPluginModuleAwareCache
com.codebarrel.jira.plugin.automation.i18n.CachingTranslationsProvider
- All Implemented Interfaces:
com.atlassian.sal.api.lifecycle.LifecycleAware
@Named
public class CachingTranslationsProvider
extends AbstractPluginModuleAwareCache
implements com.atlassian.sal.api.lifecycle.LifecycleAware
This is basically our own version of the SAL I18nResolver. SAL's class suffers from a caching bug, where
it caches getKeysForPrefix() lookups too aggressively and doesn't clear the cache on re-install.
Any plugin event will clear this cache.
-
Constructor Summary
ConstructorsConstructorDescriptionCachingTranslationsProvider(com.atlassian.cache.CacheManager cacheManager, com.atlassian.plugin.event.PluginEventManager pluginEventManager, I18nHelper.BeanFactory i18nBeanFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoidgetAllTranslationsForPrefix(String prefix, Locale locale) getHash()Methods inherited from class com.codebarrel.jira.plugin.automation.util.AbstractPluginModuleAwareCache
onPluginDisabled, onPluginEnabled, onPluginModuleDisabled, onPluginModuleEnabled, onStart, onStopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.sal.api.lifecycle.LifecycleAware
onStart, onStop
-
Constructor Details
-
CachingTranslationsProvider
@Inject public CachingTranslationsProvider(com.atlassian.cache.CacheManager cacheManager, com.atlassian.plugin.event.PluginEventManager pluginEventManager, I18nHelper.BeanFactory i18nBeanFactory)
-
-
Method Details
-
clearCache
public void clearCache()- Specified by:
clearCachein classAbstractPluginModuleAwareCache
-
getAllTranslationsForPrefix
-
getHash
-