Skip to content

Commit 8438bf0

Browse files
Ajiboye-01dippindots
authored andcommitted
FIX:cacheENabledConfig restructured
1 parent 8d70900 commit 8438bf0

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

src/main/java/org/cbioportal/legacy/persistence/CacheEnabledConfig.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,11 @@ public class CacheEnabledConfig {
3333
@PostConstruct
3434
public void init() {
3535
this.enabled = enableCache(cacheType);
36-
LOG.info("Cache is enabled: " + this.enabled);
37-
this.enabledClickhouse = enableCache(cacheTypeClickhouse);
38-
LOG.info("Cache is enabled for clickhouse: " + this.enabledClickhouse);
36+
// for cpu performance purpose, the logged info styling was changed is changed
37+
LOG.info("Cache is enabled: {}", this.enabled);
38+
this.enabledClickhouse = enableCache(cacheTypeClickhouse);
39+
// for cpu performance purpose, the logged info styling was changed is changed
40+
LOG.info("Cache is enabled for clickhouse: {}", this.enabledClickhouse);
3941
}
4042

4143
public static boolean enableCache(String cacheType) {

src/main/java/org/cbioportal/legacy/persistence/mybatis/PatientMyBatisRepository.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package org.cbioportal.legacy.persistence.mybatis;
22

3-
import java.util.Arrays;
3+
import java.util.Collections;
44
import java.util.List;
55
import org.cbioportal.legacy.model.Patient;
66
import org.cbioportal.legacy.model.meta.BaseMeta;
@@ -50,7 +50,7 @@ public List<Patient> getAllPatientsInStudy(
5050
String direction) {
5151

5252
return patientMapper.getPatients(
53-
Arrays.asList(studyId),
53+
Collections.singletonList(studyId),
5454
null,
5555
null,
5656
projection,
@@ -63,7 +63,7 @@ public List<Patient> getAllPatientsInStudy(
6363
@Override
6464
public BaseMeta getMetaPatientsInStudy(String studyId) {
6565

66-
return patientMapper.getMetaPatients(Arrays.asList(studyId), null, null);
66+
return patientMapper.getMetaPatients(Collections.singletonList(studyId), null, null);
6767
}
6868

6969
@Override

0 commit comments

Comments
 (0)