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) {
|
||||||
|
|
|
@ -461,5 +461,14 @@ public class TerminologyCache {
|
||||||
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