mirror of
https://github.com/hapifhir/org.hl7.fhir.core.git
synced 2025-02-27 16:15:56 +00:00
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);
|
||||
}
|
||||
|
||||
public void clearTSCache(String url) throws Exception {
|
||||
txCache.removeCS(url);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<ConceptMap> findMapsForSource(String url) throws FHIRException {
|
||||
synchronized (lock) {
|
||||
|
@ -460,6 +460,15 @@ public class TerminologyCache {
|
||||
public static void setNoCaching(boolean noCaching) {
|
||||
TerminologyCache.noCaching = noCaching;
|
||||
}
|
||||
|
||||
public void removeCS(String url) {
|
||||
synchronized (lock) {
|
||||
String name = getNameForSystem(url);
|
||||
if (caches.containsKey(name)) {
|
||||
caches.remove(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user