Add support for removing code systems from the cache

This commit is contained in:
Grahame Grieve 2020-06-18 08:46:01 +10:00
parent 93b0d74eb5
commit 6a6f6e6167
2 changed files with 14 additions and 0 deletions

View File

@ -773,6 +773,11 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte
txCache = new TerminologyCache(lock, cachePath);
}
public void clearTSCache(String url) throws Exception {
txCache.removeCS(url);
}
@Override
public List<ConceptMap> findMapsForSource(String url) throws FHIRException {
synchronized (lock) {

View File

@ -461,5 +461,14 @@ public class TerminologyCache {
TerminologyCache.noCaching = noCaching;
}
public void removeCS(String url) {
synchronized (lock) {
String name = getNameForSystem(url);
if (caches.containsKey(name)) {
caches.remove(name);
}
}
}
}