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 TypeMethodDescriptionvoid
void
getCssContent
(String cssFileName) getTemplateContent
(String templateFileName) void
onClearCache
(ClearCacheEvent event)
-
Constructor Details
-
CachingJiraHomeTemplateContentLoaderImpl
public CachingJiraHomeTemplateContentLoaderImpl(JiraHomeTemplateContentLoader jiraHomeTemplateContentLoader, com.atlassian.cache.CacheManager cacheManager)
-
-
Method Details
-
getTemplateContent
- Specified by:
getTemplateContent
in interfaceJiraHomeTemplateContentLoader
-
getCssContent
- Specified by:
getCssContent
in interfaceJiraHomeTemplateContentLoader
-
clearTemplatesCache
public void clearTemplatesCache()- Specified by:
clearTemplatesCache
in interfaceCachingJiraHomeTemplateContentLoader
-
clearCssCache
public void clearCssCache()- Specified by:
clearCssCache
in interfaceCachingJiraHomeTemplateContentLoader
-
onClearCache
-