Package com.atlassian.jira.template
Class CachingJiraHomeTemplateContentLoaderImpl
java.lang.Object
com.atlassian.jira.template.CachingJiraHomeTemplateContentLoaderImpl
- All Implemented Interfaces:
CachingJiraHomeTemplateContentLoader,JiraHomeTemplateContentLoader
@InjectableComponent
public class CachingJiraHomeTemplateContentLoaderImpl
extends Object
implements CachingJiraHomeTemplateContentLoader
The purpose of this class is to cache all the contents of files loaded from Jira Home templates directory.
In DC mode the Jira Home Shared directory may not be available always -> to mitigate this problem we're
not caching missing files and retrying to read the files next time the given template is requested.
Note: Be aware that @BotoCssInliner has it's own caching logic. This class
provides additional layer of caching.
-
Constructor Summary
ConstructorsConstructorDescriptionCachingJiraHomeTemplateContentLoaderImpl(JiraHomeTemplateContentLoader jiraHomeTemplateContentLoader, com.atlassian.cache.CacheManager cacheManager) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidgetCssContent(String cssFileName) getTemplateContent(String templateFileName) voidonClearCache(ClearCacheEvent event)
-
Constructor Details
-
CachingJiraHomeTemplateContentLoaderImpl
public CachingJiraHomeTemplateContentLoaderImpl(JiraHomeTemplateContentLoader jiraHomeTemplateContentLoader, com.atlassian.cache.CacheManager cacheManager)
-
-
Method Details
-
getTemplateContent
- Specified by:
getTemplateContentin interfaceJiraHomeTemplateContentLoader
-
getCssContent
- Specified by:
getCssContentin interfaceJiraHomeTemplateContentLoader
-
clearTemplatesCache
public void clearTemplatesCache()- Specified by:
clearTemplatesCachein interfaceCachingJiraHomeTemplateContentLoader
-
clearCssCache
public void clearCssCache()- Specified by:
clearCssCachein interfaceCachingJiraHomeTemplateContentLoader
-
onClearCache
-