Add support for removing code systems from the cache
This commit is contained in:
parent
93b0d74eb5
commit
6a6f6e6167
|
@ -773,6 +773,11 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte
|
||||||
txCache = new TerminologyCache(lock, cachePath);
|
txCache = new TerminologyCache(lock, cachePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void clearTSCache(String url) throws Exception {
|
||||||
|
txCache.removeCS(url);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ConceptMap> findMapsForSource(String url) throws FHIRException {
|
public List<ConceptMap> findMapsForSource(String url) throws FHIRException {
|
||||||
synchronized (lock) {
|
synchronized (lock) {
|
||||||
|
|
|
@ -460,6 +460,15 @@ public class TerminologyCache {
|
||||||
public static void setNoCaching(boolean noCaching) {
|
public static void setNoCaching(boolean noCaching) {
|
||||||
TerminologyCache.noCaching = noCaching;
|
TerminologyCache.noCaching = noCaching;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void removeCS(String url) {
|
||||||
|
synchronized (lock) {
|
||||||
|
String name = getNameForSystem(url);
|
||||||
|
if (caches.containsKey(name)) {
|
||||||
|
caches.remove(name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue