public String md5ForEntity(AdminsConfig config) { String cacheKey = cacheKey(config, "cacheKey"); return getFromCache(config, cacheKey); }
public String md5ForEntity(DataSharingSettings dataSharingSettings) { String cacheKey = cacheKey(dataSharingSettings, "data_sharing_settings"); return getFromCache(cacheKey, dataSharingSettings); }
private String getFromCache(String cacheKey, Object dbObject) { String cachedMD5 = getFromCache(cacheKey); if (cachedMD5 != null) { return cachedMD5; } String md5 = CachedDigestUtils.md5Hex(new GsonBuilder().create().toJson(dbObject)); goCache.put(ETAG_CACHE_KEY, cacheKey, md5); return md5; }
public String md5ForEntity(PipelineConfig config) { String cacheKey = cacheKey(config, config.name()); return getFromCache(config, cacheKey); }
public String md5ForEntity(SecurityAuthConfig config) { String cacheKey = cacheKey(config, config.getId()); return getFromCache(config, cacheKey); }
private String getFromCache(Object domainObject, String cacheKey) { String cachedMD5 = getFromCache(cacheKey); if (cachedMD5 != null) { return cachedMD5; } String md5 = computeMd5For(domainObject); goCache.put(ETAG_CACHE_KEY, cacheKey, md5); return md5; }
public String md5ForEntity(ElasticProfile config) { String cacheKey = cacheKey(config, config.getId()); return getFromCache(config, cacheKey); }
public String md5ForEntity(PackageDefinition config) { String cacheKey = cacheKey(config, config.getId()); return getFromCache(config, cacheKey); }
public String md5ForEntity(ArtifactStore artifactStore) { String cacheKey = cacheKey(artifactStore, artifactStore.getId()); return getFromCache(cacheKey, artifactStore); }
public String md5ForEntity(EnvironmentConfig config) { String cacheKey = cacheKey(config, config.name()); return getFromCache(config, cacheKey); }
public String md5ForEntity(Role config) { String cacheKey = cacheKey(config, config.getName()); return getFromCache(config, cacheKey); }
public String md5ForEntity(PipelineConfigs pipelineConfigs) { String cacheKey = cacheKey(pipelineConfigs, pipelineConfigs.getGroup()); return getFromCache(pipelineConfigs, cacheKey); }
public String md5ForEntity(PackageRepository config) { String cacheKey = cacheKey(config, config.getId()); return getFromCache(config, cacheKey); }
public String md5ForEntity(PluginSettings pluginSettings) { String cacheKey = cacheKey(pluginSettings, pluginSettings.getPluginId()); return getFromCache(cacheKey, pluginSettings); }
public String md5ForEntity(UsageStatisticsReporting usageStatisticsReporting) { String cacheKey = cacheKey(usageStatisticsReporting, usageStatisticsReporting.getServerId()); return getFromCache(cacheKey, usageStatisticsReporting); }
public String md5ForEntity(PipelineTemplateConfig config) { String cacheKey = cacheKey(config, config.name()); return getFromCache(config, cacheKey); }
public String md5ForEntity(SCM config) { String cacheKey = cacheKey(config, config.getName()); return getFromCache(config, cacheKey); }
public String md5ForEntity(ConfigRepoConfig config) { String cacheKey = cacheKey(config, config.getId()); return getFromCache(config, cacheKey); }