Better name for cacheErrors

This commit is contained in:
dotasek 2022-01-06 19:01:45 -05:00
parent a12324c3a6
commit 06cbe7245c
2 changed files with 9 additions and 7 deletions

View File

@ -125,8 +125,8 @@ public class TerminologyCache {
private static boolean cacheErrors; private static boolean cacheErrors;
static { static {
String cacheErrorsProperty = System.getProperty("cacheErrors"); String cacheErrorsProperty = System.getProperty("fhir.txcache.cacheErrors");
cacheErrors = cacheErrorsProperty != null ? "TRUE".equals(cacheErrorsProperty.toUpperCase(Locale.ROOT)) : false; cacheErrors = cacheErrorsProperty != null && "TRUE".equals(cacheErrorsProperty.toUpperCase(Locale.ROOT));
} }
// use lock from the context // use lock from the context
@ -137,9 +137,11 @@ public class TerminologyCache {
requestCount = 0; requestCount = 0;
hitCount = 0; hitCount = 0;
networkCount = 0; networkCount = 0;
if (folder != null)
if (folder != null) {
load(); load();
} }
}
public void clear() { public void clear() {
caches.clear(); caches.clear();

View File

@ -373,7 +373,7 @@
<exclude>org/hl7/fhir/validation/cli/**</exclude> <exclude>org/hl7/fhir/validation/cli/**</exclude>
</excludes> </excludes>
<systemPropertyVariables> <systemPropertyVariables>
<cacheErrors>TRUE</cacheErrors> <fhir.txcache.cacheErrors>TRUE</fhir.txcache.cacheErrors>
</systemPropertyVariables> </systemPropertyVariables>
</configuration> </configuration>
</plugin> </plugin>
@ -405,7 +405,7 @@
<exclude>org/hl7/fhir/validation/cli/**</exclude> <exclude>org/hl7/fhir/validation/cli/**</exclude>
</excludes> </excludes>
<systemPropertyVariables> <systemPropertyVariables>
<cacheErrors>TRUE</cacheErrors> <fhir.txcache.cacheErrors>TRUE</fhir.txcache.cacheErrors>
</systemPropertyVariables> </systemPropertyVariables>
</configuration> </configuration>
</plugin> </plugin>