diff --git a/src/net/java/sip/communicator/impl/history/HistoryServiceImpl.java b/src/net/java/sip/communicator/impl/history/HistoryServiceImpl.java index 4444cb660..50e857dc5 100644 --- a/src/net/java/sip/communicator/impl/history/HistoryServiceImpl.java +++ b/src/net/java/sip/communicator/impl/history/HistoryServiceImpl.java @@ -46,6 +46,8 @@ public class HistoryServiceImpl implements HistoryService { private DocumentBuilder builder; + private boolean cacheEnabled = false; + public HistoryServiceImpl() throws Exception { @@ -230,6 +232,13 @@ public void setConfigurationService( { this.configurationService = configurationService; log.debug("New configuration service registered."); + + // store some config for further use + Object isCacheEnabledObj = + this.configurationService.getProperty(HistoryService.CACHE_ENABLED_PROPERTY); + + if(isCacheEnabledObj != null && isCacheEnabledObj.equals(HistoryService.CACHE_ENABLED)) + cacheEnabled = true; } } @@ -282,4 +291,13 @@ public void unsetFileAccessService(FileAccessService fileAccessService) } } + /** + * Returns whether caching of readed documents is enabled or desibled. + * @return boolean + */ + protected boolean isCacheEnabled() + { + return cacheEnabled; + } + }